MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 7 as of 2018-06-14 22:10:13
  • jq

jq

jq is a lightweight and flexible command-line JSON processor.

Slackbuild

Toggle line numbers
   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/system/jq.tar.gz
   3 tar xvzf jq.tar.gz
   4 cd jq
   5 wget https://github.com/stedolan/jq/releases/download/jq-1.4/jq-1.4.tar.gz
   6 ./jq.SlackBuild
   7 installpkg /tmp/jq-1.4-i486-1_SBo.tgz
  • jq-1.4-i486-1_SBo.tgz

Change values

test.json

Toggle line numbers
   1 {
   2   "keyx":12,
   3   "keyz":"ddff"
   4 }

test2.json

Toggle line numbers
   1 {
   2   "keyx":12,
   3   "keyz":"ddff",
   4   "arr":[1,2,3,4]
   5 }

Toggle line numbers
   1 jq '.keyx = 55 | .keyz = "otherVal"' test.json
   2 # output
   3 {
   4   "keyx": 55,
   5   "keyz": "otherVal"
   6 }

Get value from key

Toggle line numbers
   1 jq '.keyx' test.json 
   2 # output
   3 12
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01