Skip to content

Compound operator chaining does not support interspersed dots #422

@CosmicToast

Description

@CosmicToast

Consider the following object:
{"package": {"foo": "bar"}}

Then consider the queries seeking to get out bar, in jq and jaq respectively.

In jq: .package.foo and .package.["foo"] both return bar.
In jaq, .package.foo returns bar, but .package.["foo"] complains about an invalid token.
.package["foo"] works as expected, but is non-obvious (relative to .["package"]["foo"]; note that .["package"].["foo"] is similarly valid in jq but not jaq).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions