How to iterate through a list of JSON response in Bash shell (Bash/Linux/ZShell/Mac)

Bryant Jimin Son
3 min readNov 8, 2021
Ever wonder how can you iterate through a list of JSON response in a shell scripting like Bash?

I was writing a Bash shell script file that needs to query an URL endpoint with a curl, which then returns a JSON object response. One thing I had to do it to extract a list of all “name” values from the JSON object looking like one below.

--

--

Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.