How can I grab productId from the outside array after checking for the condition. I have tried $..items[?(@.stock.available==true)].productId
productId
$..items[?(@.stock.available==true)].productId