Hello everyone,
I deserialized a JObject coming from an HTTP Request. Now I want to add a key value pairs to the same JObject but I am having so much trouble trying to make this work. Is there a simple way of doing it that I am missing?
Thanks in advance!
loginerror
(Maciej Kuźmicz)
April 8, 2021, 2:04pm
2
Hi @Hattan_Hamoud
See here for some example on how to create JSON from scratch:
Actually, there are several ways to produce a string JSON in that Body property of the HTTP Request activity.
My current go-to methods are these two below:
either have a template text file for longer JSON input bodies, that I format using String.Format method
or even simpler, make a JSON from scratch, like so:
first import this one in the Imports panel:
[image] )
Then use something like that:
New JObject( _
New JProperty("key","value") _
).ToString
It outputs this in Studio:
[image…
And then, something like this should work:
The result:
Thanks Maciej!
I see how it works now.
1 Like