I have a file
[{key: 'value',key1:{key:'value'},fields:[{to:{id:'value'},field:{id:'value',name:'value'}},{key:'value'}]}]
I need to find elements of initial array which have and array .fields[] which have .field.id=='status' and .to.id=="closed"
I ve tried [.changelog[] | select(.fields[]|select(.field.id=="status" and (.to.key=="closed" or .to.key=="done")))]
A mistake 'cannot iterate over null' apears. Apparently, i can use .changelog[].fields
but i cant use .changelog[].fields[]