Skip to main content

Hi how can I create like this json format : 
 

{
"name1": "MyData",
"version1": "1.0",
"APPS": {
"name2": "MyData",
"version2": "1.0"
}
}

for name1 and version1 i’ll put in the Json node path $$ what about the others key values  ?  

@lahcenAglagal Unfortunately, you cannot. You can build it using string handling, or by writing your own JavaScript or Python code. 


Hi how can I create like this json format : 
 

{
"name1": "MyData",
"version1": "1.0",
"APPS": {
"name2": "MyData",
"version2": "1.0"
}
}

for name1 and version1 i’ll put in the Json node path $$ what about the others key values  ?  

Hey ​@lahcenAglagal  you can use the String replace Action to replace particular Nodes with Updated values. You can create an default JSON Template in a String variable like:

{
"name1": "",
"version1": "",
"APPS": {
"name2": "",
"version2": ""
}
}

And use the Source String as the Whole template, Find as “name2”: “”

and Replace as “name2”:”$<The value you want>$”

or you can enter “NULL” in the JSON Response and replace that as well.


@lahcenAglagal  You can do that using “Json” Package and actions available within this package.

 

Select the value type as dictionary while adding the APPS node.

 

 

You will get the exact JSON as you wanted: