I have a jsons array that I need to iterate over. I make a curl and get this result, and I need to process it. The array is as follows:
[
{"id": "f0345a01", "name": "scala1"},
{"id": "6f907cf", "name": "scala2"},
{"id": "d887f61", "name": "scala3"},
{"id": "5d07fca", "name": "scala5"},
{"id": "94ddaa", "name": "scala12"}
]
I need to get the id from this array. I could not find a way to do this. I tried the following question about stackoverflow:
for i in "${arr[@]}"
do
echo "$i"
done
Tarun source
share