Usage
After installing it, you may call jstr
providing the Help argument to understand a bit more about its options and such:
jstr --help
This will print some examples and description to available options, but jstr
is quite simple to understand, it will basically:
Receive a JSON input;
By simply providing the relative file path:
jstr my-file.json
;Or using the Input option to receive your JSON from a piped command (
stdin
).
Apply any transformation based on the Options provided;
Run the Callback Parser (if provided) passing the result from step 2;
Output the data by printing it (or copy to clipboard, if you pass the Copy option).
As you can see, all options & handler are optional, making jstr
quite a flexible tool.
And as usual, since jstr
will by default print the result to your terminal, you can use it to create new JSON files (or whatever file type you want):
jstr ... > my-new-file.json
Last updated