Skip to content

Singleton operator has no effect on an array of objects #236

@DaelDe

Description

@DaelDe

Consider the following input:

[
{"type":"command"},
{"type":"commands"}
]

and expression $[type='command']. It returns the first object properly. However, I want to use the singleton operator to have easier handling: $[][type='command'] does not return an array of matches and $[type='command'][] does neither.
How can I always return an array of results in my case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions