Skip to content

Feature request: Only include certain attributes #1

@rejeep

Description

@rejeep

Hello mr. Bjorn.

It's not in my nature to ask other people for favors (unless sexual), but I'm too lazy in this case.

I would like an option that works similar to transformers. The option takes one or more arguments and will for each JSON line, only include attributes that are specified as arguments to the option. For example:

{"one": "lorem", "two": "ipsum",     "three": "dolor"}
{"one": "amet",  "two": "consequat", "three": "tortor"}
{"one": "quis",  "two": "fermentum", "three": "magna"}

Running this:

$ cat ABOVE-FILE | jku --some-option one three

Would produce this:

{"one": "lorem", "three": "dolor"}
{"one": "amet",  "three": "tortor"}
{"one": "quis",  "three": "magna"}

Could you please implement this for me sugar?

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