Using jq to parse and display multiple fields in a json serially

I recommend using String Interpolation:

jq '.users[] | "\(.first) \(.last)"'

We are piping down the result of .users[] to generate the string “.first .last” using string interpolation. \(foo) syntax is used for string interpolation in jq. So, for the above example, it becomes “Stevie Wonder” (".users[].first .users[].second" working elementwise) and “Michael Jackson”.

jq reference: String interpolation

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)