Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 522 Bytes

filter.md

File metadata and controls

20 lines (11 loc) · 522 Bytes

jline-filter

Filter JSON lines

Simple usage:

To demonstrate we will apply the filter to just one line:

echo '{"bumble":{"bee":99}}' | jline-filter 'bumble.bee>3'
echo '{"not":"here"}'        | jline-filter 'not !== "there"'
echo '{"bumble":{"bee":99},"wasp":false}' | jline-filter 'bumble.bee>3 && !wasp'

Advanced usage:

You can provide your own function that applies to each 'record':

 echo '{"bumble":{"bee":99}}' | jline-filter -f 'return Math.sin(record.bumble.bee) > 1;'