json icon indicating copy to clipboard operation
json copied to clipboard

How to reverse `--items` back to object form? (filter sub-objects)

Open CodeMan99 opened this issue 6 years ago • 0 comments

Am I missing something or is there no way to reverse --items? Say something like

$ cat object.json | json --items -c 'this.value.battles > 2' | json --to-object

Where the output would have the same object shape as the input, just filtered out some of the key-value pairs.

CodeMan99 avatar Dec 29 '18 07:12 CodeMan99