I'm not sure if this is a stupid beginner question or if it is a bug. Tested in 3.1 and 3.4 Milestone ..
LET descriptions = {
"en": [
"test1 test2"
],
"de": [
"test3 test4"
]
}
// This one works:
// FOR w IN descriptions.en RETURN w
// This one works NOT:
FOR w IN descriptions.de RETURN w
What do I make wrong?
This is a perfectly valid question. Running the query
LET descriptions = { "en": [ "test1 test2" ], "de": [ "test3 test4" ] }
FOR w IN descriptions.de
RETURN w
produces an unexpected error
ArangoError 1563: collection or array expected as operand to FOR loop; you specified type 'string' with content '{"en":["test1 test2"],"de":["test3 test4"]}.de' (while loading collections)
It works when using descriptions.en instead of descriptions.de, which really makes no sense from the user perspective.
Turns out to be a bug that will be fixed by the following pull request: https://github.com/arangodb/arangodb/pull/4522
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With