Skip to content

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

@romanlamsal

Description

@romanlamsal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions