I am working with a JSON below:
{
"CITY": "JANCOK NJARAN",
"FATHER": {
"1": "WEDHUS",
"2": "ANDRE"
},
"MOTHER": {
"11": "SARAH",
"22": "EVELYN",
"33": "MARKONAH"
}
}
I parse it with jq to read json
file=$(cat config.json)
city=$(echo $file | ./jq '.CITY')
father=$(echo $base_config | ./jq '.FATHER[]')
I have $data :
HE IS WEDHUS FROM JANCOK NJARAN, ALSO MARKONAH
For now i have a lot of problem, i know how to do it with php, but dont know how to do it with bash
what i want is parse the json using jq and search string inside $data with json provided
Expected output is like this.
Search in $data with JSON config :
Found WEDHUS with id 1 , and MARKONAH with id 2
Any help will be appreciated, thanks