I have a JSON response that includes two elements that correspond to ID fields in a repeating subdocument. Specifically, it stores the ID value of the default billing and default shipping addresses for a customer. The JSON profile looks like this:
My difficulty comes in figuring out how to loop through the 'addresses' array and find the instance with a matching ID field to each of the default address fields in the main object - default_billing and default_shipping in the image above.
I need to map the address data into Salesforce (Contact object, Mailing Address and Other Address). Because there can be a variable number of instances of the address array, I can't just add an identifier instance by occurrence.