Size: 1017
Comment:
|
Size: 1344
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 56: | Line 56: |
* curl http://api.icndb.com/jokes/random 2>/dev/null | json_reformat {{{#!highlight javascript { "type": "success", "value": { "id": 55, "joke": "Most people have 23 pairs of chromosomes. Chuck Norris has 72... and they're all poisonous.", "categories": [ ] } } }}} |
jq
jq is a lightweight and flexible command-line JSON processor.
Slackbuild
Change values
test.json
test2.json
Get value from key
Curl JSON replay example
* curl http://api.icndb.com/jokes/random 2>/dev/null | json_reformat
1 curl http://api.icndb.com/jokes/random 2>/dev/null | jq '.value.joke' | sed s/\"//g