Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "connections": {}
- }
- jq --arg ssid "$1" --arg pass "$2" '.connections.$ssid = "$pass"' file.json > tmp.json && mv tmp.json file.json
- {
- "connections": {key:"value"}
- }
- jq --arg ssid abc --arg pass 123 '.connections[$ssid] = $pass' < file.json
- {
- "connections": {
- "abc": "123"
- }
- }
Add Comment
Please, Sign In to add comment