<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Nested Json</title><link>https://community.appian.com/discussions/f/general/11424/nested-json</link><description>I need to make a webservice call with nested jsons in the parameters. Has anyone successfully done it? I tried using a!toJson within another a!toJson with no success. 
 
 a!toJson( {&amp;quot;name&amp;quot;:&amp;quot;Document C&amp;quot;, &amp;quot;type&amp;quot;: a!toJson({&amp;quot;fields&amp;quot;: a!toJson({&amp;quot;name&amp;quot;:&amp;quot;Bob</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Nested Json</title><link>https://community.appian.com/thread/50271?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 19:59:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de36e2b2-19c1-43b5-a9e7-3fda8a2aac7b</guid><dc:creator>tommyc0001</dc:creator><description>Thank you Jose and coltonb. Both methods worked.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nested Json</title><link>https://community.appian.com/thread/50265?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 18:59:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c4e5091-3a76-4380-b976-80282b6ed78e</guid><dc:creator>josep</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	
	
{&amp;quot;name&amp;quot;:&amp;quot;Document C&amp;quot;,&amp;quot;type&amp;quot;:{&amp;quot;fields&amp;quot;:{&amp;quot;name&amp;quot;:&amp;quot;Bob&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;identification&amp;quot;,&amp;quot;subtype&amp;quot;:&amp;quot;FULLNAME&amp;quot;},&amp;quot;role&amp;quot;:&amp;quot;user&amp;quot;,&amp;quot;id&amp;quot;:&amp;quot;xxx&amp;quot;},&amp;quot;id&amp;quot;:&amp;quot;xxxxx&amp;quot;,&amp;quot;extract&amp;quot;:true}&lt;/pre&gt;I think what you want is to take out all those nested toJson like this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!toJson(
  {
    &amp;quot;name&amp;quot;: &amp;quot;Document C&amp;quot;,
    &amp;quot;type&amp;quot;: 
      {
        &amp;quot;fields&amp;quot;:
          {
            &amp;quot;name&amp;quot;: &amp;quot;Bob&amp;quot;,
            &amp;quot;type&amp;quot;: &amp;quot;identification&amp;quot;,
            &amp;quot;subtype&amp;quot;: &amp;quot;FULLNAME&amp;quot;
          }
        ,
        &amp;quot;role&amp;quot;: &amp;quot;user&amp;quot;,
        &amp;quot;id&amp;quot;: &amp;quot;xxx&amp;quot;
      }
    ,
    &amp;quot;id&amp;quot;: &amp;quot;xxxxx&amp;quot;,
    &amp;quot;extract&amp;quot;: true
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the result will be this :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	
&amp;quot;{&amp;quot;name&amp;quot;:&amp;quot;Document C&amp;quot;,&amp;quot;type&amp;quot;:{&amp;quot;fields&amp;quot;:{&amp;quot;name&amp;quot;:&amp;quot;Bob&amp;quot;,&amp;quot;type&amp;quot;:&amp;quot;identification&amp;quot;,&amp;quot;subtype&amp;quot;:&amp;quot;FULLNAME&amp;quot;},&amp;quot;role&amp;quot;:&amp;quot;user&amp;quot;,&amp;quot;id&amp;quot;:&amp;quot;xxx&amp;quot;},&amp;quot;id&amp;quot;:&amp;quot;xxxxx&amp;quot;,&amp;quot;extract&amp;quot;:true}&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In case you have tried this without success please let me know more about the scenario&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jose Perez&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nested Json</title><link>https://community.appian.com/thread/50260?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 16:57:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ce49b61-2a95-4cfc-9bf1-dbeae13989ac</guid><dc:creator>Colton Beck</dc:creator><description>&lt;p&gt;Are the slashes the only issue? If so, you could use the &lt;a href="https://docs.appian.com/suite/help/17.4/fnc_text_stripwith.html"&gt;stripwith()&lt;/a&gt; function to remove them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>