Skip to content

Cosmos: Stop nesting results in an extra JSON object #25527

@roji

Description

@roji

Our basic Cosmos query looks like this:

SELECT c FROM root c

This produces results such as the following:

[
    {
        "c": {
            "id": "...",
            "Foo": 1,
        }
    },
    {
        "c": {
            "id": "...",
            "Foo": 2,
        }
    }
]

Instead, we could generate the following simpler star-based query:

SELECT VALUE c FROM root c

Which produces:

[
    {
        "id": "...",
        "Foo": 1,
    },
    {
        "id": "...",
        "Foo": 2,
    }
]

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions