How to map XML in Matching Column (Step 2) ?
In this XML, the mapping must begin with {{ .. }} & data and proceed down each level to the target node.
Example 1: How to map specific fields XML data
[
{
"Aktif": "Evet",
"UrunKartiID": "65",
"UrunAdi": "Palomino Blackwing Replacement Eraser White Yedek Silgi Beyaz",
"OnYazi": "",
"Aciklama": "Değiştirilebilir, kare silgiler. Silginizi değiştirmek için, silgiyi ve klipsi halkanın dışına kaydırın, eski silgiden klibi çıkarın, yeni silgiyi klibe yerleştirin ve yeni silgiyi ve klipsi halkaya yerleştirin. Paket 10 adet silgi içermektedir. ",
"Marka": "BLACKWING",
"MarkaID": "6",
"SatisBirimi": "ADET",
"KategoriID": "26",
"Kategori": "Silgi",
"KategoriTree": "KIRTASİYE/Silgi",
"UrunUrl": "https://www.unmeiprojects.com.tr/palomino-blackwing-replacement-eraser-white-yedek-silgi-beyaz",
"Resimler": {
"Resim": "https://static.ticimax.cloud/54336/Uploads/UrunResimleri/blackwing-silgi-yedegi-10lu-9-b207.jpg"
},
"UrunSecenek": {
"Secenek": {
"Aktif": "Evet",
"VaryasyonID": "65",
"StokKodu": "BLCKWNGSLGYDG10",
"Barkod": "BLCKWNGSLGYDG10",
"StokAdedi": "0",
"AlisFiyati": "3.75",
"SatisFiyati": "196.63",
"IndirimliFiyat": "0.00",
"KDVDahil": "true",
"KdvOrani": "10",
"ParaBirimi": "tr-TR",
"ParaBirimiKodu": "TRY",
"Desi": "1",
"EkSecenekOzellik": null
}
Based on the above XML data, how should specific fields be mapped?
- How to map
VaryasyonID?
{{data.UrunSecenek.Secenek.VaryasyonID}}
- How to map
Kategori?
{{data.Kategori}}
- How to map
Resim?
{{data.Resimler.Resim}}
Example 2: How to map this XML data images with nested row
{
"variant_sku": "1023014652",
"variant_title": "Helmet MTB Enduro 3.0 V23 Stealth Large - 59-63cm",
"barcode": "6009554002779",
"available": "1.00",
"date_due_in": "15-JUN-2025",
"qty_due_in": "8",
"rrp": "499.00",
"cost": "300.00",
"group_id": "e819d190-80a9-e845-95e0-40f9fa72063f",
"product_title": "Helmet MTB Enduro 3.0 V23 Stealth",
"brand": "Leatt",
"product_html": "The most versatile helmet you can buy! The Enduro 3.0 helmet...",
"tags": null,
"product_images": {
"image": [
"https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650.jpg",
"https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650 2.jpg",
"https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650 3.jpg",
"https://www.bikecorp.co.nz/Images/ProductImages/Large/1023034650 4.jpg"
]
}
}
- How to map
image: This is different because the image ground truth spans multiple rows, requiring a specific mapping approach as described.
["{{data.product_images.image | join: '","' }}"]
Example 3: How to map the XML data from certain category only
"Std": {
"Std": [
{
"Category": "body_colorgroup",
"Code": "grey",
"Label": "Grigio"
},
{
"Category": "body",
"Code": "grey",
"Label": "Grigio"
}
]
}
- How to map
Labelvalue when the Category isbody_colorgroup
{{ data.Std.Std | find: 'Category', 'body_colorgroup' | map: 'Label' }}
Example 4: How to map the XML data from two section of image link
"g:id": "991943819",
"g:identifier_exists": "no",
"g:title": "Рейка декоративна PS горіх 2900х120х12мм SW-00001739",
"g:description": "<p>Стінова рейка є елементом для обробки внутрішніх стін в інтер'єрі, має зовнішній вигляд, що імітує текстуру дерева.</p>\n<p><strong>Характеристики:</strong></p>\n<ul>"
"g:link": "https://kabinet.dropoffice.com.ua/catalog/1644?source=merchant_center",
"g:ads_redirect": "https://kabinet.dropoffice.com.ua/catalog/1644?source=merchant_center",
"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",
"https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/d7ffe098bc-4_resize_1200x1200.jpg",
"https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/98b8f238b1-5_resize_1200x1200.jpg",
"https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/504d739331-6_resize_1200x1200.jpg",
"https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/9ed7fe1d03-7_resize_1200x1200.jpg",
"https://kabinet.dropoffice.com.ua/uploads/cache/CatalogItems/CatalogItems1644/fd973cc6e8-8_resize_1200x1200.jpg"
]
- How to map
g:image_link and g:additional_image_linkvalue
["{{ data["g:image_link"] }}","{{data["g:additional_image_link"] | join: '","' }}"]
Example 5: How to map the XML data to make first letter in capitalize only
"id": "991943819",
"identifier_exists": "no",
"tags": "ALL", "Bridal", "COLLECTIONS", "DRESSES", "EUPHORIA", "FORMAL AND PROM", "GOWNS", "IVORY", "Satin", "WHITE",
- How to map
tagsvalue to this"All", "Bridal", "Collections", "Dresses", "Euphoria", "Formal and prom", "Gowns", "Ivory", "Satin", "White"]
{% for item in data.tags %}{{ item | capitalize }}{% unless forloop.last %};{% endunless %}{%- endfor -%}
Example 6: Selecting and extracting the value from a sub-array containing {"Name"=>"Garancija"}.
{"Attributes": {"Attribute"=>[[{"Name"=>"Barva"}, "črna"], [{"Name"=>"Kapaciteta"}, "2.500 strani"], [{"Name"=>"Tip"}, "Originalen toner"], [{"Name"=>"Garancija"}, "12M"]]}}
- How to map
12Mvalue to this12
{{ data | jmespath: "Attributes.Attribute[?@[0].Name == `Garancija``] | [0][1]" | remove: "M" }}
Example 7: Mapping Specific Image Sections
{"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"]}}
- How to map
specific image
{{data | jmespath: "Images.Image" | json}}
Example 8: How to return second item in the array?
{"Delivery": [{"Id"=>"1"}, "3"]}
- How to map second item array
{{ data.Delivery[1] }}
Updated on: 20/04/2026
Thank you!
