GROQ icon indicating copy to clipboard operation
GROQ copied to clipboard

[GROQ] Why can't I project a primitive to an object?

Open romanlamsal opened this issue 7 months ago • 0 comments

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.

romanlamsal avatar Nov 22 '23 16:11 romanlamsal