Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

How to get brew list as JSON output

$
0
0

I am running brew list --versions to get this list:

    user@mac ~ [1]> brew list --versions    fish 3.7.0    ncurses 6.4    pcre2 10.43    syncthing 1.27.4    appcleaner 3.6.8    teamviewer 15.51.6

How can I put the output to a json object like this:

[   {"name":"fish","version":"3.7.0"   },   {"name":"ncurses","version":"6.4"   }]

Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>