Forum Discussion

gsingam's avatar
gsingam
Occasional Contributor
2 years ago
Solved

How to match the json sibling using expression

"Criteria" : [ { "selectionCriteriaType" : "DEFENSE_REASONS", "selectionCriteriaValue" : "AdditionalInformation" }, { "selectionCriteriaType" : "AVS_RESULT", "selectionCriteriaValue" : "A" },...
  • KarelHusa's avatar
    2 years ago

    gsingam,

    I would use the following expression:

     

    $.Criteria[?(@.selectionCriteriaType=="REFUND_STATE" && @.selectionCriteriaValue=="false")]

     

    Please note your boolean elements are represented as strings now ("false" instead of false). I would recommend to fix it.

     

    Best regards,

    Karel