<?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>question Re: how to pass values to json object in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435058#M948729</link>
    <description>&lt;P&gt;What error are you getting? I am only see the unnecessary quotes before your curly bracket, otherwise should be fine.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var inccategory = current.category.getDisplayValue();
var result = {'category':inccategory};&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 05 Jan 2023 21:16:16 GMT</pubDate>
    <dc:creator>laszloballa</dc:creator>
    <dc:date>2023-01-05T21:16:16Z</dc:date>
    <item>
      <title>how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435052#M948726</link>
      <description>&lt;P&gt;how can I pass the incident category value dynamically in key value format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var inccategory = current.category.getDisplayValue();&lt;/P&gt;&lt;P&gt;&amp;nbsp;var result = "{'category':inccategory} // this gives me error but if I print logs then I am able to see correct value&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:05:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435052#M948726</guid>
      <dc:creator>Priti18</dc:creator>
      <dc:date>2023-01-05T21:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435058#M948729</link>
      <description>&lt;P&gt;What error are you getting? I am only see the unnecessary quotes before your curly bracket, otherwise should be fine.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var inccategory = current.category.getDisplayValue();
var result = {'category':inccategory};&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:16:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435058#M948729</guid>
      <dc:creator>laszloballa</dc:creator>
      <dc:date>2023-01-05T21:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435059#M948730</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Do like below&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var inccategory = current.category.getDisplayValue();

 var result ={};
result.category=inccategory;

var strJSON=JSON.stringify(result)

gs.info(strJSON)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:17:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435059#M948730</guid>
      <dc:creator>Saurabh Gupta</dc:creator>
      <dc:date>2023-01-05T21:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435063#M948731</link>
      <description>&lt;P&gt;I tried it gives me error in flow designer&lt;/P&gt;&lt;P&gt;I also tried .toString, in logs i can see the correct value but in flow designer it gives below error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unrecognized inccategory was expecting null, nan, string&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:19:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435063#M948731</guid>
      <dc:creator>Priti18</dc:creator>
      <dc:date>2023-01-05T21:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435064#M948732</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;It will not work in flow designer as current object is not available flow like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:24:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435064#M948732</guid>
      <dc:creator>Saurabh Gupta</dc:creator>
      <dc:date>2023-01-05T21:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435067#M948733</link>
      <description>&lt;P&gt;then how to pass value of category in flow&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:27:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435067#M948733</guid>
      <dc:creator>Priti18</dc:creator>
      <dc:date>2023-01-05T21:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435070#M948734</link>
      <description>&lt;P&gt;Please share where are you writing this code. screenshot please.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:29:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435070#M948734</guid>
      <dc:creator>Saurabh Gupta</dc:creator>
      <dc:date>2023-01-05T21:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435072#M948735</link>
      <description>&lt;P&gt;Flow designer is different. It really depends on where you are trying to access your incident record (flow, subflow, action, is it a trigger or a result of look-up, etc.), but basically you can get to it starting from the fd_data object.&lt;/P&gt;&lt;P&gt;For instance, if your incident is the trigger of the flow, it would look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fd_data.trigger.current.category.getDisplayValue();&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:30:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435072#M948735</guid>
      <dc:creator>laszloballa</dc:creator>
      <dc:date>2023-01-05T21:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435078#M948737</link>
      <description>&lt;P&gt;under actions I am trying to send value to 3rd party where am passing the value of category (label value) to key&lt;/P&gt;&lt;P&gt;var inccategory = fd_data.trigger.current.category.getDisplayValue();&lt;/P&gt;&lt;P&gt;gs.info('print category ' + inccategory); // gives me correct value&lt;/P&gt;&lt;P&gt;&amp;nbsp;var result = '{"category":inccategory}'; // this part doesn't take above value instead it shows&amp;nbsp;inccategory&lt;/P&gt;&lt;P&gt;return result;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:36:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435078#M948737</guid>
      <dc:creator>Priti18</dc:creator>
      <dc:date>2023-01-05T21:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435083#M948739</link>
      <description>&lt;P&gt;Remove the quotes around the curly braces:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var result = {"category":inccategory};&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:44:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435083#M948739</guid>
      <dc:creator>laszloballa</dc:creator>
      <dc:date>2023-01-05T21:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass values to json object</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435086#M948740</link>
      <description>&lt;P&gt;Awesome it worked!!!&lt;/P&gt;&lt;P&gt;can you please explain as well so for future any one can take reference from this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:49:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-pass-values-to-json-object/m-p/2435086#M948740</guid>
      <dc:creator>Priti18</dc:creator>
      <dc:date>2023-01-05T21:49:05Z</dc:date>
    </item>
  </channel>
</rss>

