<?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: How to add a dynamic value in json using blueprism in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55872#M1210</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would try the Utility - JSON VBO and convert the JSON to a collection, do the updates on the collection, then convert back to JSON.&lt;BR /&gt;&lt;BR /&gt;if it is something simpler then a string replace might be more suitable using a calc stage and Replace function.&lt;BR /&gt;&lt;BR /&gt;peter&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;PeterLacken&lt;BR /&gt;Ren Røros Intelligent Automation&lt;BR /&gt;Peter.Lacken@rria.no&lt;BR /&gt;&lt;A href="http://www.rria.no" target="test_blank"&gt;http://www.rria.no&lt;/A&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Mon, 19 Jul 2021 13:09:00 GMT</pubDate>
    <dc:creator>peterlacken</dc:creator>
    <dc:date>2021-07-19T13:09:00Z</dc:date>
    <item>
      <title>How to add a dynamic value in json using blueprism</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55871#M1209</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a JSON format which needs to be sent as a input payload. How can we assign values in the JSON dynamically? We have values in the different data items and these values need to be replaced in the JSON.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;I have json data:&lt;BR /&gt;{&lt;BR /&gt;"name": "xyz",&lt;BR /&gt;"Type": "Input"&lt;BR /&gt;}&lt;BR /&gt;In this, I need to replace the value xyz with other value from the data item dynamically using blueprism.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help on this.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Navitha K&lt;BR /&gt;------------------------------</description>
      <pubDate>Mon, 19 Jul 2021 08:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55871#M1209</guid>
      <dc:creator>Navitha</dc:creator>
      <dc:date>2021-07-19T08:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to add a dynamic value in json using blueprism</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55872#M1210</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would try the Utility - JSON VBO and convert the JSON to a collection, do the updates on the collection, then convert back to JSON.&lt;BR /&gt;&lt;BR /&gt;if it is something simpler then a string replace might be more suitable using a calc stage and Replace function.&lt;BR /&gt;&lt;BR /&gt;peter&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;PeterLacken&lt;BR /&gt;Ren Røros Intelligent Automation&lt;BR /&gt;Peter.Lacken@rria.no&lt;BR /&gt;&lt;A href="http://www.rria.no" target="test_blank"&gt;http://www.rria.no&lt;/A&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jul 2021 13:09:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55872#M1210</guid>
      <dc:creator>peterlacken</dc:creator>
      <dc:date>2021-07-19T13:09:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to add a dynamic value in json using blueprism</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55873#M1211</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi Navitha&lt;/P&gt;
&lt;P&gt;JSON is a string so you can directly use replace to replace the xyz with your new value.&lt;/P&gt;
&lt;P&gt;Or you can extend the Utility - JSON VBO to convert the json string into a Dictionary and change the value, after which you can serialize and return the output.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;Dim values = JsonConvert.DeserializeObject(json)
values(key) = newVal
op = JsonConvert.SerializeObject(values, Formatting.None)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gopal Bhaire&lt;BR /&gt;Analyst&lt;BR /&gt;Accenture&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jul 2021 13:23:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55873#M1211</guid>
      <dc:creator>GopalBhaire</dc:creator>
      <dc:date>2021-07-19T13:23:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to add a dynamic value in json using blueprism</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55874#M1212</link>
      <description>Today, i use the replace function, i write the default value, exemple "&lt;SPAN&gt;name": "%" and make Replace([DataJson];"%": [NewValue]) Or you can use regex expression for capture the value "XYZ" and make Replace([DataJson]; [CapturedValue];[NewValue])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Emerson Ferreira&lt;BR /&gt;Sr Business Analyst&lt;BR /&gt;Avanade Brasil&lt;BR /&gt;America/Recife&lt;BR /&gt;+5581988869544&lt;BR /&gt;If my answer helped you? Mark as useful!&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:07:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55874#M1212</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-07-19T14:07:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to add a dynamic value in json using blueprism</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55875#M1213</link>
      <description>Are you working with the WebAPI service feature or a code stage? If you're using the WebAPI service feature to invoke a RESTful service you can select&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Template&lt;/STRONG&gt;&lt;/EM&gt; from the Request Body options and then add your JSON format as a template. Then you make the value portion of each element a parameter. Here's an example:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7209.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7387i39C4DF9DEBE2D1E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="7209.png" alt="7209.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7210.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/7385iF0783B425E16C9F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="7210.png" alt="7210.png" /&gt;&lt;/span&gt;&lt;BR /&gt;If you're doing this through a code stage/VBO, the answers provided by the other commenters should work well.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Partner Integrations for Digital Exchange&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/How-to-add-a-dynamic-value-in-json-using-blueprism/m-p/55875#M1213</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2021-07-19T14:24:00Z</dc:date>
    </item>
  </channel>
</rss>

