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

How to combine the sequence of objects in jq into one object?

$
0
0

I would like to convert the stream of objects:

{"a": "green","b": "white"}{"a": "red","c": "purple"}

into one object:

{"a": "red","b": "white","c": "purple"}

Also, how can I wrap the same sequence into an array?

[    {"a": "green","b": "white"    },    {"a": "red","c": "purple"    }]

Sadly, the manual is seriously lacking in comprehensiveness, and googling doesn't find the answers either.


Viewing all articles
Browse latest Browse all 527

Trending Articles



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