From d72aa3698a280ef724d1f988ddaa405e03cbf245 Mon Sep 17 00:00:00 2001 From: Robert Zondervan Date: Sat, 30 Nov 2024 12:23:21 +0100 Subject: [PATCH] Nested downloadUrl --- .../mappings/sharepoint-woo-verzoek-to-publications.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json index 75e5e38f..e056e72a 100644 --- a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json +++ b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json @@ -9,7 +9,7 @@ "category": "d.woo_x005f_categorie", "published": "{% if d['woo_x005f_publicatiedatum']|default %}{{ d['woo_x005f_publicatiedatum']|date('Y-m-d') }}{% endif %}", "modified": "d.vti_x005f_nexttolasttimemodified", - "attachments": "{{ '[' }}{% if fileUrls['d']['results']|default %}{% set index = 0 %}{% for file in fileUrls['d']['results'] %}{% if index > 0 %}{{ ', ' }}{% endif %}{{ '{' }}{% set uri = file['__metadata']['uri']~'/$value' %}{{ '\"downloadUrl\": \"'~uri~'\",\"source\": \"1\"' }}{{ '}' }}{% endfor %}{% endif %}{{ ']' }}", + "attachments": "{{ '[' }}{% if fileUrls['d']['results']|default %}{% set index = 0 %}{% for file in fileUrls['d']['results'] %}{% if index > 0 %}{{ ', ' }}{% endif %}{{ '{' }}\"downloadUrl\": {{ '{' }}{% set uri = file['__metadata']['uri']~'/$value' %}{{ '\"downloadUrl\": \"'~uri~'\",\"source\": \"1\"' }}{{ '}' }}{{ '}' }}{% endfor %}{% endif %}{{ ']' }}", "status": "{% if d['woo_x005f_publicatiedatum']|default %}Published{% else %}Concept{% endif %}", "catalog": "" }, @@ -24,4 +24,4 @@ "attachments": "jsonToArray" }, "passThrough": false -} \ No newline at end of file +}