Size: 390
Comment:
|
Size: 832
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 15: | Line 15: |
== Change values == '''test.json''' {{{#!highlight javascript { "keyx":12, "keyz":"ddff" } }}} '''test2.json''' {{{#!highlight javascript { "keyx":12, "keyz":"ddff", "arr":[1,2,3,4] } }}} {{{#!highlight bash jq '.keyx = 55 | .keyz = "otherVal"' test.json # output { "keyx": 55, "keyz": "otherVal" } }}} == Get value from key == {{{#!highlight bash jq '.keyx' test.json # output 12 }}} |
jq
jq is a lightweight and flexible command-line JSON processor.
Slackbuild
Change values
test.json
test2.json