Multiple Nested Collection structure, how to get value out | Community
Skip to main content
Level 6
May 22, 2024
Question

Multiple Nested Collection structure, how to get value out

  • May 22, 2024
  • 0 replies
  • 391 views

Hi there,

 

I have a very complicated nested array structure, that looks something like this:

 

"OfferRecos": [ { "AA": { "customerID": 123 "ABCOffers": [ { "serviceAddressId": 333 "ServiceAddress": [ { "recoTs": "2024-05-22T00:00:00Z", "offerId": "OfferID1", "offerRank": 1 }, { "recoTs": "2024-05-22T00:00:00Z", "offerId": "OfferID2", "offerRank": 2 }, { "offerPrice": 130, "offerId": "OfferID3", "recoTs": "2024-05-22T00:00:00Z", "offerRank": 3 } ] } ] } } ]

 

 

I want to grab the customerID field, where there is offerID = OfferID3. I have been stuck on this for awhile, can someone help with this please (note all the various arrays within).

 

I tried something like this:

#{ExperiencePlatform.Offers.profile.tenantID.OfferRecos.all(currentDataPackField.AA.ABCOffers.all(currentDataPackField.ServiceAddress.all(currentDataPackField.offerId == "OfferID1") is not empty) is not empty).AA.customerID}

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.