I have a Json in a varible $MYVAR like this :
{
"Name": "somename",
"MyField": "{\"mysubfield1\":\"value1\",\"mysubfield2\":\"value2\"}",
"OtherField" : "Othervalues"
...
}
My constraint - I cannot use the jq parser.
How can i parse MyField
when it's a stringified Json ? I want to extract each value of the subfields - value1
and value2
and store in variables. Is there a direct approach /plain shell commands?