GROQ
GROQ copied to clipboard
[GROQ] Why can't I project a primitive to an object?
When executing the query
1 | { "foo": "bar" }
I would expect to receive { "foo": "bar" }
as a result, yet the above will just be null
. In the same vein, when executing
1 { "value": @ }
I would expect to receive { "foo": 1 }
. Neither is happening, why?
I first thought @
might not be the right variable - but executing [1, 2, 3][@ > 2]
will result in [3]
which, on the other hand, is absolutely what I would be expecting.