<?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: Dealing with null hash/nested objects eg Link['webView']['href'] in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8248#M3457</link>
    <description>&lt;P&gt;Thanks that logic works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For anyone wanting the notation for checking parent object and returning the nested item as string:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Link['webView'].present? ?  Link['webView']['href'] : nil&lt;/LI-CODE&gt;&lt;P&gt;below works if you dont mind not getting an object back:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Link['webView'].presence&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 00:52:57 GMT</pubDate>
    <dc:creator>yelah</dc:creator>
    <dc:date>2024-12-03T00:52:57Z</dc:date>
    <item>
      <title>Dealing with null hash/nested objects eg Link['webView']['href']</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8237#M3452</link>
      <description>&lt;P&gt;I have a api call that returns similar to the following json structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "data": [
        {
            "itemId": "001",
            "links": {
                "self": {
                    "href": "http://website.com/api"
                },
                "webview": {
                    "href": "http://website.com/item"
                }
            }
        },
        {
            "itemId": "002",
            "links": {
                "self": {
                    "href": "http://website.com/api"
                }
                }
            }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to save the result in a list and have used the "Create List by Workato" action.&lt;BR /&gt;I want to capture the itemId and webView link. To capture the web view link I use the hash formula: Link['webView']['href']&lt;/P&gt;&lt;P&gt;which works but when for example itemId 002 does not have that&amp;nbsp;webView, its null. I get a formula error.&amp;nbsp;&lt;BR /&gt;I have read this article&amp;nbsp;&lt;A href="https://www.workato.com/product-hub/how-to-handle-nulls-2/" target="_self"&gt;how-to-handle-nulls-2&lt;/A&gt;&amp;nbsp;which is helpful but I am not sure how to implement this with using hash notation as the examples provided where for dot functions or items that are not nested, in forumla mode.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help for this would be great.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 07:07:19 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8237#M3452</guid>
      <dc:creator>yelah</dc:creator>
      <dc:date>2024-11-28T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null hash/nested objects eg Link['webView']['href']</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8247#M3456</link>
      <description>&lt;P&gt;I recently had a similar issue and wasn't able to figure out a way to use the "&amp;amp;" operator with hash notation.&lt;/P&gt;&lt;P&gt;I'd probably just do this and get on with it:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;webview.present? ? webview["href"] : nil&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 23:52:55 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8247#M3456</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-12-02T23:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null hash/nested objects eg Link['webView']['href']</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8248#M3457</link>
      <description>&lt;P&gt;Thanks that logic works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For anyone wanting the notation for checking parent object and returning the nested item as string:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Link['webView'].present? ?  Link['webView']['href'] : nil&lt;/LI-CODE&gt;&lt;P&gt;below works if you dont mind not getting an object back:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;Link['webView'].presence&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 00:52:57 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/dealing-with-null-hash-nested-objects-eg-link-webview-href/m-p/8248#M3457</guid>
      <dc:creator>yelah</dc:creator>
      <dc:date>2024-12-03T00:52:57Z</dc:date>
    </item>
  </channel>
</rss>

