Get root element using jsonpath based on sub elements condition
问题 I am working with the Jayway JsonPath library to obtain the correct 'id' from below JSON where my phoneNumbers type is 'iPhone'. In general, I would like to know how to find something from the root element of a block when a specific condition is specified in the sub-JSON objects. I tried below expressions that select the block associated with iPhone type and also a list of ids respectively, but I am not able to get to the root element id belonging to the JSON object where my phone type is