<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Equiavlent js Map in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4079449#M4871</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try to modify your code like below, this might potentially give you the result 'col1,col2,col3' without hard-coding the array index.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@join(activity('Script1').output.resultSets.rows.map(a =&amp;gt; a.src_colname), ',')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 02:56:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-05T02:56:23Z</dc:date>
    <item>
      <title>Equiavlent js Map</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4075023#M4850</link>
      <description>&lt;P&gt;I have a set variable activity that returns a json object and I need to perform JS&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" target="_self"&gt;Array.prototype.map&lt;/A&gt;&amp;nbsp; equiavlent in Data Pipeline.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please help. I don't want to manually hardcode by array index inside a concat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;const obj = {
	"value": {
		"colNames": [
			{
				"tbl_id": 2,
				"tbl_name": "fact_Activity",
				"src_colname": "col1",
				"sample_datetime": "2024-08-02T04:23:18Z",
				"last_run_at": "2024-08-02T00:23:40.071123Z"
			},
			{
				"tbl_id": 2,
				"tbl_name": "fact_Activity",
				"src_colname": "col2",
				"sample_datetime": "2024-08-02T04:23:18Z",
				"last_run_at": "2024-08-02T00:23:40.071123Z"
			},
			{
				"tbl_id": 2,
				"tbl_name": "fact_Activity",
				"src_colname": "col3",				
				"sample_datetime": "2024-08-02T04:23:18Z",
				"last_run_at": "2024-08-02T00:23:40.071123Z"
			}
		]
	}

const result = obj.value.colNames.map(a=&amp;gt;a.src_colname).join(",")
//'col1,col2,col3'
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@join(activity('Script1').output.resultSets[0].rows,',')

// this joins all the key-value pairs&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Aug 2024 05:20:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4075023#M4850</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2024-08-02T05:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Equiavlent js Map</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4079449#M4871</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try to modify your code like below, this might potentially give you the result 'col1,col2,col3' without hard-coding the array index.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@join(activity('Script1').output.resultSets.rows.map(a =&amp;gt; a.src_colname), ',')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 02:56:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4079449#M4871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-05T02:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Equiavlent js Map</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4079576#M4873</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; are all js Array methods valid in pipeline expression?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 03:34:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4079576#M4873</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2024-08-05T03:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Equiavlent js Map</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4110768#M5060</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, the regular js array methods are supported as of now. I'll let you know as soon as possible if subsequent tests reveal unsupported methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:50:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Equiavlent-js-Map/m-p/4110768#M5060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-21T08:50:28Z</dc:date>
    </item>
  </channel>
</rss>

