Json value extraction between arrays

Hi Sebastien,

Could you please look whether you can help me on this.
I need to extract batchId based on the Error Text.
something like this $…DetailRecord[?(@.ErrorCode==“0”)].BatchID should give 0000110219

I tried multiple combinations in jsonPath herokuapp but couldn’t crack it.

I tried the child filters but the two values are in different arrays.

below is the Json response

{
“DTResponse”: {
“Header”: {
“HFGHFGH”: “XYZ”,
“CommonHeader”: {
“BatchID”: “0000110219”,
“CorrelationId”: “”,
“Destination”: “ABC”,
“ExternalReferenceId”: “”,
“MessageCreationTimestamp”: “”,
“Source”: “”,
“TransactionType”: “”
},
“ASDFDSF”: “1234”
},
“DataArea”: {
GFHGFHGFFH": [
{
“ErrorCode”: “0”,
“ErrorText”: “Success”
}
]
}
}
}

Thanks in advance

Regards,
Aravind