https://github.com/wiktor-k/jq-filter
Filters JSON Lines using JavaScript
https://github.com/wiktor-k/jq-filter
filter jq json
Last synced: 2 months ago
JSON representation
Filters JSON Lines using JavaScript
- Host: GitHub
- URL: https://github.com/wiktor-k/jq-filter
- Owner: wiktor-k
- License: apache-2.0
- Created: 2018-12-14T13:01:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T13:02:08.000Z (over 7 years ago)
- Last Synced: 2026-03-05T04:35:40.257Z (4 months ago)
- Topics: filter, jq, json
- Language: JavaScript
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# JSON Lines filter
Filters [JSON Lines](http://jsonlines.org/) input using JavaScript.
The only argument to this tool is a predicate where `it` indicates parsed JSON line. If the predicate returns `true` the line is printed as is otherwise it is silently discarded.
Example:
```
$ cat file.jsonl
{"size":4}
{"size":5}
{"size":6}
$ cat file.jsonl | npx jq-filter 'it.size > 5'
{"size":6}
```