<?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 Javascript Snippet output not a useable list for subsequent steps in Community Chat</title>
    <link>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/7468#M276</link>
    <description>&lt;P&gt;Can anyone assist in getting my JSON structure from within a Javascript snippet to be a useable list to iterate through?&amp;nbsp; no matter how I try to 'return' an object or array in the Javascript snippet step, there is no data structure to use in subsequent steps.&amp;nbsp; I am just using a test situation after trying in vain with my actual recipe, and even a simple JSON array makes no difference.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Workato documentation is woefully lacking so I have no idea how to assign things to the output variables, I only have experience using the 'return' function.&amp;nbsp; I have taken screenshots but can't seem to upload them to this message either, sorry!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Nick&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 06:29:37 GMT</pubDate>
    <dc:creator>nick_CCEP</dc:creator>
    <dc:date>2024-09-05T06:29:37Z</dc:date>
    <item>
      <title>Javascript Snippet output not a useable list for subsequent steps</title>
      <link>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/7468#M276</link>
      <description>&lt;P&gt;Can anyone assist in getting my JSON structure from within a Javascript snippet to be a useable list to iterate through?&amp;nbsp; no matter how I try to 'return' an object or array in the Javascript snippet step, there is no data structure to use in subsequent steps.&amp;nbsp; I am just using a test situation after trying in vain with my actual recipe, and even a simple JSON array makes no difference.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Workato documentation is woefully lacking so I have no idea how to assign things to the output variables, I only have experience using the 'return' function.&amp;nbsp; I have taken screenshots but can't seem to upload them to this message either, sorry!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Nick&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 06:29:37 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/7468#M276</guid>
      <dc:creator>nick_CCEP</dc:creator>
      <dc:date>2024-09-05T06:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Snippet output not a useable list for subsequent steps</title>
      <link>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/8209#M492</link>
      <description>&lt;P&gt;Here's an example of a simple JavaScript snippet that returns a JSON array:&lt;/P&gt;&lt;P&gt;// Define your data as an array of JSON objects&lt;BR /&gt;let items = [&lt;BR /&gt;{ id: 1, name: "Item 1" },&lt;BR /&gt;{ id: 2, name: "Item 2" },&lt;BR /&gt;{ id: 3, name: "Item 3" }&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;// Return the array&lt;BR /&gt;return items;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 03:35:17 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/8209#M492</guid>
      <dc:creator>timwolfe</dc:creator>
      <dc:date>2024-11-17T03:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Snippet output not a useable list for subsequent steps</title>
      <link>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/8210#M493</link>
      <description>&lt;P&gt;If you're working with a stringified JSON and need to parse it, you can do:&lt;/P&gt;&lt;P&gt;// Example of stringified JSON input&lt;BR /&gt;let input = '[{"id": 1, "name": "Item 1"}, {"id": 2, "name": "Item 2"}]';&lt;/P&gt;&lt;P&gt;// Parse the string to JSON&lt;BR /&gt;let parsedData = JSON.parse(input);&lt;/P&gt;&lt;P&gt;// Return parsed data&lt;BR /&gt;return parsedData;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 03:35:44 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/javascript-snippet-output-not-a-useable-list-for-subsequent/m-p/8210#M493</guid>
      <dc:creator>timwolfe</dc:creator>
      <dc:date>2024-11-17T03:35:44Z</dc:date>
    </item>
  </channel>
</rss>

