<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Split cdt</title><link>https://community.appian.com/discussions/f/general/19969/split-cdt</link><description>I have this below cdt 
 {{id:1, name:&amp;quot;abc&amp;quot;},{id:2,name:&amp;quot;abc;pqr&amp;quot;}} 
 I need to transform this cdt into this: 
 {{id:1, name:&amp;quot;abc&amp;quot;},{id:2,name:&amp;quot;abc&amp;quot;},{id:2,name:&amp;quot;pqr&amp;quot;}} 
 
 Any code snippet for this?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Split cdt</title><link>https://community.appian.com/thread/78071?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 14:39:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14f7eb8d-4a64-4624-9fee-4478155e0f28</guid><dc:creator>ankitab254</dc:creator><description>&lt;p&gt;Thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Split cdt</title><link>https://community.appian.com/thread/78070?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 14:10:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c101059e-13ab-4b26-acb6-7a048399353c</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;You&amp;#39;ll need to split the second string on the semicolon - I assume that the semicolon is always used to separate the items? Then, you will need to create a couple of loops to loop through the items and create your new array. Lastly, I used a!flatten() to make it a single list instead of a list of lists. See a sample here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!array: {{id:1, name:&amp;quot;abc&amp;quot;},{id:2,name:&amp;quot;abc;pqr&amp;quot;}},
  a!flatten(
    a!forEach(
      items: local!array,
      expression: a!localVariables(
        local!id: fv!item.id,
        a!forEach(
          items: split(fv!item.name, &amp;quot;;&amp;quot;),
          expression: {
            id: local!id,
            name: fv!item
          }
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>