Skip to content

Provide normal unix-like text output #2

@winmillwill

Description

@winmillwill

There doesn't seem to be any way to output a flat list as a set of lines. Perhaps the -u option should handle flat lists this way, or we could have some other option, or even a jmespath function like 'echo' so that you could do something like:

jp 'foo.bar[] | echo(@)' -f foo.json

where foo.json like:

{
  "foo": {
    "bar": [
      "bang",
      "bling",
      "baz"
    ],
    "zow": ...
  }
}

we would get:

bang
bling
baz

which is suitable for bash loops and xargs and the like.

Apologies if I've missed what should have been an obvious way to achieve this.

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