I have this input data :
{"list": {"1": {"attributes": {"content": [],"pageable": {"pageNumber": 0,"pageSize": 10 } } },"2": {"attributes": {"content": [ {"id": "AZER" } ],"pageable": {"pageNumber": 0,"pageSize": 10 } } },"3": {"attributes": {"content": [ {"id": "WXC" }, {"id": "QSD" } ],"pageable": {"pageNumber": 0,"pageSize": 10 } } } }}I need to use JQ to extract the id values into a new array, I try this:
.list[] | .attributes.content[].id
that's my results:
"AZER""WXC""QSD"It's what i want but in 3 line and i need to have it in arrayHow can i make this results in an array like this:
["AZER","WXC","QSD"]