3 ms·
> `JSON.parse` and a working subscript operator https://github.com/ingydotnet/json-bash https://github.com/ingydotnet/json-bash source json.bash
by mst 8y ago
> `JSON.parse` and a working subscript operator
https://github.com/ingydotnet/json-bash https://github.com/ingydotnet/json-bash
source json.bash
json='{"name":"Jason","friends":["Jimmy","Joe"]}'
JSON.load "$json"
joe=$(JSON.get /friends/1)
JSON.put /friends/2 Jeff
new_json=$(JSON.dump)
It's still not as trivial as javascript, but "tooth-pullingly difficult" is a little unfair.
- eropple 8y agoAgain: sh, not bash. If I have the freedom to specify bash, I can specify something better than bash or sh.