ndquery - get desired parts from nested data structure
ndquery [OPTIONS] <arguments>
Get specified by path parts from nested data structure
On/Off colors in --list mode.
Delete substructure. May be used several times.
Combined with --list allows to define how much levels must be listed.
Grep specified by path elements from structure. May be used several times.
Print a help message and exit.
Force specified input format usage. Automatically choosed (using file extension) if omitted.
List keys for hash maps and indexes for arrays, other types printed as is.
List structure's paths.
Calculate MD5 sum for structure.
Path in the structure to deal with.
On/Off pretty-print for JSON. Enabled by default.
Dont't format result simple things (strings/numbers) - dump them as is.
Replace original files by query result.
Fail if unexisted path specified. Enabled by default.
Values will be printed if combined with --list opt.
Increase verbosity, max level - 4.
Print version and exit.
Show as pretty printed canonical JSON:
ndquery struct.json
Get specified path from document:
ndquery --path '{some}{path}[2]' struct.json
List subpaths:
ndquery --list --path '{some}{path}[2]' struct.json
Checksum for substructures:
ndquery --md5 --path '{some}{path}' struct.json another.json
0 No errors occured. 1 Generic error code. 2 I/O Error. 4 Path related errors. 8 Path does not exists.
Report bugs to https://github.com/mr-mixas/NDTools/issues
jq(1)
nddiff(1), ndpatch(1), ndproc(1)
Copyright 2016,2017 Michael Samoglyadov <mixas at cpan.org>.
<mixas at cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of GNU General Public License 3 or later versions.
To install App::NDTools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::NDTools
CPAN shell
perl -MCPAN -e shell install App::NDTools
For more information on module installation, please visit the detailed CPAN module installation guide.