Skip to main content
Contributor I
July 22, 2022
Solved

Filter Arrray

  • July 22, 2022
  • 1 reply
  • 103 views

Hi,

 

I Have data like this

{“item”: {

   “properties”:

      [

         [ “name”: “other1”, “value”: “other”],

         [ “name”: “other2”, “value”: “other”],

         [ “name”: “image”, “value”: “url_image”],

         [ “name”: “other3”, “value”: “other”],

         [ “name”: “other4”, “value”: “other”],

      ]

}}

 

i want to show image use url_image from array properties where name = image 

please help me

    This topic has been closed for replies.
    Best answer by stephen.trumble

    Hey@dahaaw 

    Welcome to the Klaviyo Community! Thank you for asking the community for help with your array.

    Depending on what event you are tracking will ultimately determine what syntax to use. I would suggest you track a test event to find the correct event variable and to see how the data populates first, then copy/paste the tag. Most likely the event tag will look like this: 

     {{ event.item.properties.2.value }}

    Once you have the proper event tag can use code similar this this example where name = image. 

    Hope this helps! Thank you again for being part of the Klaviyo Community!

    1 reply

    stephen.trumble
    Klaviyo Alum
    July 22, 2022

    Hey@dahaaw 

    Welcome to the Klaviyo Community! Thank you for asking the community for help with your array.

    Depending on what event you are tracking will ultimately determine what syntax to use. I would suggest you track a test event to find the correct event variable and to see how the data populates first, then copy/paste the tag. Most likely the event tag will look like this: 

     {{ event.item.properties.2.value }}

    Once you have the proper event tag can use code similar this this example where name = image. 

    Hope this helps! Thank you again for being part of the Klaviyo Community!

    -Stephen