{"id":6,"description":"jq - query to create new json with fields from another json","tags":["jq","tools","programming"],"contents":["$ jq '{(.foo) : .bar}' test.json # use the value of field \"foo\" as the key and value of \"bar\" as the value for new object","# () syntax is used to create a key for the resulting object","$ jq '{\"name\" : .name, \"age\": .age}' test.json # create new object with keys \"name\" and \"age\""]}
