Avatar

Correct answer by
Level 10

Hi,

So I'm guessing it is valid to have a PersonAddress element without an AddressType element.  The predicate is going to go though your dataset and evaluate the expression for each PersonAddress.

So if AddressType is optional you will need to guard against this error, something like;

$.PersonAddress.[if (Exists(AddressType)) then AddressType=="Home" endif].Address

Also is the AddressType value Mail or Mailing? The error message does not match the original XML.

Regards

Bruce

View solution in original post