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

How to map array of object to object key-value pairs in JQ?

$
0
0

Using JQ how do I convert array of objects to key-value pair object?

Given the JSON:

[  {"name": "foo","id": "123"  },  {"name": "bar","id": "456"  }]

Desired output:

{"foo": "123","bar": "456"}

Viewing all articles
Browse latest Browse all 657

Trending Articles



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