Skip to content

jp always alphabetically sorts the output? #20

@DawMatt

Description

@DawMatt

Hi,

Is there a way to prevent JP from alphabetically sorting the output? I've tried using the -e and -f parameters, just the -f parameter, and no command line arguments other than the expression.

Attached is a very simple example in a data.zip file.

Using the following command on Windows 10, I'm finding the contents of the out.json file is alphabetically sorted. e.g.
jp -f data.json -e expr.json > out.json

Similarly these invocations experience the same result:

  • jp -f data.json "@" > out.json
  • type data.json | jp "@" > out.json

data.zip

The VS Code extension honours the order of the expression statements. Is there a way for jp to behave similarly?

Thanks, Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions