ndjson-search
Search within ndjson files
Usage no npm install needed!
<script type="module">
import ndjsonSearch from 'https://cdn.skypack.dev/ndjson-search';
</script>
Search within ndjson files
<script type="module">
import ndjsonSearch from 'https://cdn.skypack.dev/ndjson-search';
</script>
quot;
ndjs ./file.ndsjon --field payload.user.id --value 123
ndjs ./file.ndsjon --field payload.user.id --value 123 > result.ndjson
ndjs ./file.ndsjon --field payload.user.id --value 123 --output json
ndjs ./file.ndsjon --field payload.user.id --value 123 --indent 2 --colors
ndjs <input>
Search the ndjson
Positionals:
input The input file path [string]
Options:
--version Show version number [boolean]
--help Show help [boolean]
--indent, -i Spaces of indentation for the json, if not provided no
indentation is applied. [number]
--field, -f Field/path to match on (no field will return everything)
[string]
--pattern, -p RegEx pattern to match the field on [string]
--value, -v Exact value to match the field on [string]
--limit, -l Maximum amount of items the retrieve [number]
--output, -o Search result output format
[string] [choices: "ndjson", "json", "count"] [default: "ndjson"]
--colors, -c Syntax highlight the json/ndjson output
[boolean] [default: false]