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

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.

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Learn TypeScript — Beginner level

An image of a night sky with mountains in the background.

Blazor Server Project #4: Understanding URL Routing & Navigation

Angular Mono-Repo using Lerna and Yarn Workspaces (for reusability)

How to Connect to Remote Debugger

Connect debugger to remote server of your node application

Online Shopping Web Application (part 3)

7 things to triple-check before launching a website

Recipe for Disaster — Developers Not Trained to Be Creative but Required to Create Unique Software

JavaScript: How to Check if Empty (Strings, Objects and Arrays)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bryant Jimin Son

Bryant Jimin Son

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

More from Medium

Copying files to and from remote server using ssh

type in terminal: man scp

How To Find Linux System Installation Date

Ingesting and processing multiple lines in Linux using an array and loops.

Installing Docker Desktop on modern Windows

Turn Windows features on or off