Expand my Community achievements bar.

Never miss an update of the Adobe Journey Optimizer Community Lens! Subscribe now to get the latest updates, insights, and highlights delivered straight to your inbox every time a new edition drops.

Multiple Nested Collection structure, how to get value out

Avatar

Level 7

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!

0 Replies