Hi I'm playing a bit with jq and have a problem.
This is my data:
{
"auctionInfo": [{
"tradeId": 229143000306,
"itemData": {
"id": 320854114832,
"rating": 82
}
},
{
"tradeId": 229143000307,
"itemData": {
"id": 320854114833,
"rating": 84
}
},
{
"tradeId": 229143000308,
"itemData": {
"id": 320854114834,
"rating": 84
}
}
]
}
What I now want are alle tradeIds where the rating is 84.
So I tried it with this filter:
| jq -r .auctionInfo[].itemData | select(.rating==84)
But with this filter I'm inside the itemData and have no access to the tradeId which I'm interested for. I'm not really familiar with jq so might be a basic question but how can I reach the tradeId from where I'm standing with this filter?