-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pitr
committed
Oct 2, 2021
1 parent
6cc71d4
commit 6e04388
Showing
6 changed files
with
9,643 additions
and
9,643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
|
||
Flatten your JSON. | ||
|
||
`fj` flattens JSON into a value and its full path per line, so data can be worked on using UNIX tools such as grep/awk/etc. | ||
`fj` flattens JSON into a value and its full path per line, so data can be worked on using UNIX tools such as grep/awk/cut/etc. | ||
|
||
<pre> | ||
❯ curl -s "https://api.github.com/repos/golang/go/commits?per_page=1" | <b>fj</b> | grep commit.author | ||
json[0].commit.author.name = "Josh Bleecher Snyder" | ||
json[0].commit.author.email = "[email protected]" | ||
json[0].commit.author.date = "2021-06-30T16:44:30Z" | ||
json[0].commit.author.name "Josh Bleecher Snyder" | ||
json[0].commit.author.email "[email protected]" | ||
json[0].commit.author.date "2021-06-30T16:44:30Z" | ||
</pre> | ||
|
||
fj can un-flatten too, which is useful to get a subset of JSON: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.