Ich muss JSON mit Shell-Skript zu analysieren (ich verwendet Python, aber nicht in dieser bestimmten Umgebung erlaubt), in diesem Beispiel möchte ich den Wert b1
, die 6.5
ist, jemand irgendwelche Erfahrung haben?parsen JSON mit Shell-Skript
Verwendung von Linux/Mac OSX.
{
"value": {
"a1": {
"amount": "5.5",
"currency": "USD"
},
"b1": {
"amount": "6.5",
"currency": "USD"
},
"c1": {
"d1": {
"amount": "7.5",
"currency": "USD"
},
"e1": {
"amount": "8.5",
"currency": "USD"
},
"f1": {
"amount": "9.5",
"currency": "USD"
}
},
"g1": {
"amount": "10.5",
"currency": "USD"
},
}
}
https: // github.com/dominictarr/JSON.sh – user3159253
oder https://github.com/step/JSON.awk Wenn Sie AWK – user3159253
haben, aber AFAIR oython ist eine Standardkomponente jeder OS X-Installation, oder? – user3159253