Articles on: Frequently Asked Questions (FAQ)

How to map XML in Matching Column (Step 2) ?

Use these examples to map XML or JSON feed data in Step 2: Matching Column. Every mapping starts with {{ .. }} and data, then goes down each level to the node you want.



How the Mapping Path Works


Start with data, then add each level of the feed separated by a dot (.), until you reach the target node.



Mapping Examples


1. Map Specific Fields from XML Data


Sample feed:


[
  {
    "UrunAdi": "Palomino Blackwing Replacement Eraser White Yedek Silgi Beyaz",
    "Marka": "BLACKWING",
    "Kategori": "Silgi",
    "Resimler": {
      "Resim": "https://static.ticimax.cloud/54336/Uploads/UrunResimleri/blackwing-silgi-yedegi-10lu-9-b207.jpg"
    },
    "UrunSecenek": {
      "Secenek": {
        "VaryasyonID": "65",
        "StokKodu": "BLCKWNGSLGYDG10",
        "StokAdedi": "0",
        "SatisFiyati": "196.63"
      }
    }
  }
]


  • VaryasyonID: {{data.UrunSecenek.Secenek.VaryasyonID}}
  • Kategori: {{data.Kategori}}
  • Resim (image): {{data.Resimler.Resim}}


2. Map Images Spread Across Rows


Sample feed:


{
  "variant_sku": "1023014652",
  "product_title": "Helmet MTB Enduro 3.0 V23 Stealth",
  "product_images": {
    "image": [
      "https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650.jpg",
      "https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650 2.jpg"
    ]
  }
}


Images span multiple rows in this feed, so map them with:


["{{data.product_images.image | join: '","' }}"]


3. Map a Value from a Specific Category Only


Sample feed:


"Std": {
  "Std": [
    { "Category": "body_colorgroup", "Code": "grey", "Label": "Grigio" },
    { "Category": "body", "Code": "grey", "Label": "Grigio" }
  ]
}


To map Label only when Category is body_colorgroup, use:


{{ data.Std.Std | find: 'Category', 'body_colorgroup' | map: 'Label' }}



Sample feed fields:


"g:image_link": "https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/3b0069d04b-1_resize_1200x1200.jpg",
"g:additional_image_link": [
  "https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/6c17370813-2_resize_1200x1200.jpg",
  "https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/76296ef619-3_resize_1200x1200.jpg"
]


To map both g:image_link and g:additional_image_link, use:


["{{ data["g:image_link"] }}","{{data["g:additional_image_link"] | join: '","' }}"]


5. Capitalize the First Letter of Each Value


Sample feed:


"tags": "ALL", "Bridal", "COLLECTIONS", "DRESSES", "EUPHORIA", "FORMAL AND PROM", "GOWNS", "IVORY", "Satin", "WHITE"


To capitalize each tag, use:


{% for item in data.tags %}{{ item | capitalize }}{% unless forloop.last %};{% endunless %}{%- endfor -%}


6. Extract a Value from a Sub-Array


Sample feed:


{"Attributes": {"Attribute"=>[[{"Name"=>"Barva"}, "črna"], [{"Name"=>"Garancija"}, "12M"]]}}


To get 12 from 12M, use:


{{ data | jmespath: "Attributes.Attribute[?@[0].Name == 'Garancija'] | [0][1]" | remove: "M" }}


7. Map a Specific Image Section


Sample feeds:


{"Image": {"Image": "https://www.printmania.si/images/0004852_0.jpeg"}}
{"Images": {"Image": ["https://www.printmania.si/images/0035117_0.jpeg", "https://www.printmania.si/images/0031754_0.png"]}}


To map the image, use:


{{data | jmespath: "Images.Image" | json}}


8. Return the Second Item in an Array


Sample feed:


{"Delivery": [{"Id"=>"1"}, "3"]}


To map the second item, use:


{{ data.Delivery[1] }}


9. Return the First Photo's URL


Sample feed:


<photos>
<photo id="14334" main="1"><![CDATA[https://b2b.deltaoptical.pl/zasoby/import/l/lens-pen_4_1_2.jpg]]></photo>
<photo id="7627" main="0"><![CDATA[https://b2b.deltaoptical.pl/zasoby/import/l/lens-pen_1_1_2.jpg]]></photo>
</photos>


To get the image where main equals 1, use:


{{ data | jmespath: 'photos."photo"[?[0].main=="1"][] | [?type(@)==string] | [0]' }}



Key Rules & Technical Details


  • Start with data: Every mapping begins with {{ data, followed by each level of the feed.
  • Test first: Check each mapping on 2–3 products before running the full feed.



Troubleshooting Steps


  • Issue: The mapping returns nothing → Solution: Check that each level name matches the feed exactly, including capitalization.
  • Issue: Images are missing → Solution: Use the image example that matches your feed structure (Examples 2, 4, or 7).



Good Articles to Continue


Updated on: 13/11/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!