I want to parse in bash the json-string like this:
{"710":{"sysKey":"ENTER"},"230":{"sysKey":"DELETE"},"804":{"sysKey":"ADD"}}
My task is to find the value of key {"sysKey":"DELETE"}
and get 230
My try:
echo '{"710":{"sysKey":"ENTER"},"230":{"sysKey":"DELETE"},"804":{"sysKey":"ADD"}}' | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["sysKey"]["DELETE"];'
Help me please!