<?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>want to add all arrays,</title><link>https://community.appian.com/discussions/f/rules/28611/want-to-add-all-arrays</link><description>Hi all, I have a requirement to add all arrays (say array1,array2, and array3 ) and display them in 3 lines, Exmple : Country:{&amp;quot;India&amp;quot;,&amp;quot;china&amp;quot;,&amp;quot;USA&amp;quot;}, State:{&amp;quot;Bangalore&amp;quot;,&amp;quot;Fujian&amp;quot;,&amp;quot;Texas&amp;quot;} Language:{&amp;quot;Kannada&amp;quot;,&amp;quot;Mandarin&amp;quot;,&amp;quot;English&amp;quot;} 
 I used merge and joinarray</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: want to add all arrays,</title><link>https://community.appian.com/thread/112383?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 16:27:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:60a6ee02-c760-41a4-b185-feb9d71c24d9</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;There seem to be some assumptions here you&amp;#39;re not stating.&amp;nbsp; Is the ordering / length of the 3 arrays expected to always be matching / consistent?&amp;nbsp; I.e. the first entry in the &amp;quot;countries&amp;quot; array will always match the first one in &amp;quot;states&amp;quot; and likewise with &amp;quot;languages&amp;quot;, etc?&lt;/p&gt;
&lt;p&gt;If so, it seems like your initial setup might be improved (if possible) - instead of a random assortment of arrays, why aren&amp;#39;t we starting out with a list of dictionary / CDT / map, with structured data?&amp;nbsp; i.e.&lt;/p&gt;
&lt;p&gt;local!dataList: { a!map(country: &amp;quot;USA&amp;quot;, state: &amp;quot;Texas&amp;quot;, language: &amp;quot;English), a!map(country: &amp;quot;China&amp;quot;....), ... },&lt;/p&gt;
&lt;p&gt;That&amp;#39;d make it quite a bit more straightforward to display the info you want to have displayed, without the necessary guesswork and (imho) sloppy merge() operations necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: want to add all arrays,</title><link>https://community.appian.com/thread/112381?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 16:22:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bd183480-e534-42dd-8003-eefcffa4b0b3</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!Country:{&amp;quot;India&amp;quot;,&amp;quot;china&amp;quot;,&amp;quot;USA&amp;quot;},
  local!State:{&amp;quot;Bangalore&amp;quot;,&amp;quot;Fujian&amp;quot;,&amp;quot;Texas&amp;quot;},
  local!Language:{&amp;quot;Kannada&amp;quot;,&amp;quot;Mandarin&amp;quot;,&amp;quot;English&amp;quot;},

  a!forEach(
    items: merge(local!Country,local!state,local!language),
    expression: joinarray(
      fv!item,
      &amp;quot; - &amp;quot;
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>