I have this JSON String:
{"name":"http://someUrl/ws/someId","id":"someId"}
I just want to get value for "id" key and store it in some variable. I succesfully tried using jq. But due to some constraints, I need to achieve this just by using grep and string matching.
I tried this so far: grep -Po '"id":.*?[^\\]"';
But that is giving "id":"ws-4c906698-03a2-49c3-8b3e-dea829c7fdbe"
as output. I just need the id value. Please help
asktell your superiors to let you do your job with the right tools. – glenn jackman Aug 18 '17 at 13:35