How To Parse and Sum JSON Data

1

Record a JSON file named tutorial.json. This file will be used for parsing and summing data.

savvy write file --step-id=stp_d174318a29d14ecb
2

Parse the key 'k' from the tutorial.json file.

jq '.k' tutorial.json
3

Sum the integer list in the tutorial.json file.

jq '.int_list | add' tutorial.json