In bash I got a json response from a mongo query:
...
json=`echo $con`
echo $json
The result looks something like this:
{ "_id" : "579289cc0", "externalId" : "2911", "externalTenantGUID" : "29d3928e53b", "name" :["X", "Y"] ... }{ "_id" : "5792892323", "externalId" : "291e31", "externalTenantGUID" : "29d3928e3253b", "name" :["X", "Y"] ... }{ "_id" : "57923320", "externalId" : "293211", "externalTenantGUID" : "29d3928322e53b", "name" :["X", "Y"] ... }
Here I want to parse this response $con and get only the values mapped to "_id", like 579289cc0, 5792892323, 57923320. I tried using sed and awk without success(to manny conditions), is there a simpler way without installing python?