<?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: Handing complex JSON objects in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11820#M4548</link>
    <description>&lt;P&gt;I think that you did not understand my question.&amp;nbsp; I have a Recipe Function that returns a defined schema.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 320px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2573i73E43BBCE53EBC85/image-dimensions/320x100/is-moderation-mode/true?v=v2" width="320" height="100" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After calling this function, I want to use the list and the data from another output to build a payload.&amp;nbsp; I figured out that I needed to define the schema of a list to be able to use the list from the output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, here is what I am trying to do.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create final object -&amp;nbsp;{ "matchOnName": true, "entities": [] }&lt;/LI&gt;&lt;LI&gt;Loop through each record from source.&lt;/LI&gt;&lt;LI&gt;Create a JSON object for the record -&amp;nbsp;{ "id": "00000000-0000-0000-0000-000000000000", "entityFieldValues": []}&lt;/LI&gt;&lt;LI&gt;For each property that I want to add, generate use the list above to find the matching definition and build an object like:&lt;BR /&gt;{&lt;BR /&gt;"fieldId": "00000000-0000-0000-0000-000000000000",&lt;BR /&gt;"number": 0.0,&lt;BR /&gt;"string": "",&lt;BR /&gt;"dateValue": "",&lt;BR /&gt;"boolean": false&lt;BR /&gt;}&lt;BR /&gt;and add&amp;nbsp;this object the&amp;nbsp;entityFieldValues above&lt;/LI&gt;&lt;LI&gt;Then, add the record for the object to the&amp;nbsp;entities collection.&lt;/LI&gt;&lt;LI&gt;Finally, send the JSON object to another API&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Feb 2026 13:14:02 GMT</pubDate>
    <dc:creator>AMacourek</dc:creator>
    <dc:date>2026-02-11T13:14:02Z</dc:date>
    <item>
      <title>Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11806#M4541</link>
      <description>&lt;P&gt;I have a need to read data from several sources and push that data into another API.&amp;nbsp; The API input is the following schema:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "matchOnName": true,
  "entities": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "entityFieldValues": [
        {
          "fieldId": "00000000-0000-0000-0000-000000000000",
          "number": 0.0,
          "string": "",
          "dateValue": "",
          "boolean": false
        }
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;What I need to do is for each record from the source build a record to add to the entities collection. Before adding to the collection, for each value, I need to add a record the entityFieldValues collection.&amp;nbsp; This is trivial code in C#, JS, etc.&amp;nbsp; I just want to know how to translate it into Workato.&lt;/P&gt;&lt;P&gt;I guess I could create a Ruby action to handle this, but I am unclear how to create hash objects based on a sample schema. The approach would be to first create base object.&amp;nbsp; Then, for each source record, create array of values and call a function to add the values to the list for each value.&amp;nbsp; Then, take this array and combine to create the entity object and the add to the entities collection. Would these all be Ruby actions?&lt;/P&gt;&lt;P&gt;Also, I have a Recipe Function that returns an object result.&amp;nbsp; How can I pass this result to a Ruby action as an object?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 13:27:39 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11806#M4541</guid>
      <dc:creator>AMacourek</dc:creator>
      <dc:date>2026-02-10T13:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11816#M4546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/13305"&gt;@AMacourek&lt;/a&gt;, ratherthan going with ruby or js, i can suggest you one native to workato solution, which will help you out,&amp;nbsp;you can select&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;JSON Request Body&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the HTTP step rather than&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Raw JSON Request Body&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When you choose&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;JSON Request Body&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the Request Content Type, you can define the schema based on your request payload. This allows you to easily map data pills from previous steps without writing formulas manually or scripting.&lt;/P&gt;&lt;P&gt;For your reference, I am attaching an image. With this approach, there is no need for any additional steps.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rajeshjanapati_0-1770788937038.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2571i754C0F5DDB91F085/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="rajeshjanapati_0-1770788937038.png" alt="rajeshjanapati_0-1770788937038.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 05:51:15 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11816#M4546</guid>
      <dc:creator>rajeshjanapati</dc:creator>
      <dc:date>2026-02-11T05:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11820#M4548</link>
      <description>&lt;P&gt;I think that you did not understand my question.&amp;nbsp; I have a Recipe Function that returns a defined schema.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 320px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2573i73E43BBCE53EBC85/image-dimensions/320x100/is-moderation-mode/true?v=v2" width="320" height="100" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After calling this function, I want to use the list and the data from another output to build a payload.&amp;nbsp; I figured out that I needed to define the schema of a list to be able to use the list from the output.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, here is what I am trying to do.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create final object -&amp;nbsp;{ "matchOnName": true, "entities": [] }&lt;/LI&gt;&lt;LI&gt;Loop through each record from source.&lt;/LI&gt;&lt;LI&gt;Create a JSON object for the record -&amp;nbsp;{ "id": "00000000-0000-0000-0000-000000000000", "entityFieldValues": []}&lt;/LI&gt;&lt;LI&gt;For each property that I want to add, generate use the list above to find the matching definition and build an object like:&lt;BR /&gt;{&lt;BR /&gt;"fieldId": "00000000-0000-0000-0000-000000000000",&lt;BR /&gt;"number": 0.0,&lt;BR /&gt;"string": "",&lt;BR /&gt;"dateValue": "",&lt;BR /&gt;"boolean": false&lt;BR /&gt;}&lt;BR /&gt;and add&amp;nbsp;this object the&amp;nbsp;entityFieldValues above&lt;/LI&gt;&lt;LI&gt;Then, add the record for the object to the&amp;nbsp;entities collection.&lt;/LI&gt;&lt;LI&gt;Finally, send the JSON object to another API&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 13:14:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11820#M4548</guid>
      <dc:creator>AMacourek</dc:creator>
      <dc:date>2026-02-11T13:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11821#M4549</link>
      <description>&lt;P&gt;one question is, how do you want to make a request to API, either you want to pass whole json body with array of items at once or one item at a time?&lt;BR /&gt;&lt;BR /&gt;please let me know, then I can able to suggest the specific solution.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 13:41:39 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11821#M4549</guid>
      <dc:creator>rajeshjanapati</dc:creator>
      <dc:date>2026-02-11T13:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11822#M4550</link>
      <description>&lt;P&gt;The API call would be the entire payload with the array of items.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 14:09:44 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11822#M4550</guid>
      <dc:creator>AMacourek</dc:creator>
      <dc:date>2026-02-11T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11830#M4555</link>
      <description>&lt;P&gt;This looks like a simple case of "how do I get from &lt;EM&gt;here&lt;/EM&gt; to &lt;EM&gt;there&lt;/EM&gt;?" but you only provided what "there" looks like. Can you provide samples of your different inputs so we can see how they need to be mapped to the final API format?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 18:36:42 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11830#M4555</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-02-11T18:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Handing complex JSON objects</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11845#M4564</link>
      <description>&lt;P&gt;I have this working now. I just needed to figure out how Workato works with objects and nested lists. What really helped is a post that pointed out that a nested list can be populated by supplying the list of values in a formula.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 19:36:30 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/handing-complex-json-objects/m-p/11845#M4564</guid>
      <dc:creator>AMacourek</dc:creator>
      <dc:date>2026-02-12T19:36:30Z</dc:date>
    </item>
  </channel>
</rss>

