Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Filter out primitive values

In this example we will see how to filter out primitive values.

If your input looks like

{"key": "value"}
100
"test"
[1, 2, 3, 4]
false
null

You can use jawk like:

jawk \
    --only-objects-and-arrays

To produce:

{"key": "value"}
[1, 2, 3, 4]