Hi all,
I am using an Integration object to invoke a REST based Service. I have marked "Convert the JSON Response body to an Appian value" and I can see the Response. I have steored it a TEXT variable:
[credentials:[site:[id:769f67f3-0bdc-4da4-95db-31afaf90f9ad,contentUrl:BADIS],user:[id:17164bc1-dafc-4e45-9254-4437284fffed],token:yyyyyyyyyyyyy]]
How, can I get the different values in simple variables (siteId, userId, Token, etc) ?
Is the value atuomatically returned in a dictionary? If so, how can I get the values from there? I am also trying to find out what is a dictionary but I cant find anything useful
I have also read about a!fromJson but when I use it with my Text Parameter an error is thrown.
Many thanks!
Discussion posts and replies are publicly visible
you are calling Integration from Integration object or process model ?
if by Integration object then try like below code
load(
local!data:rule!Integration ().result.body,
a!fromJson(local!data))
then you will get list of dictionary
if by process model then you can directly save body and then use a!fromJson()
Thanks, I am calling it from a process model. When I use a!fromJson() the whole Response is saved in a text variable but I want to parse it and get only parts of it (the token)
I could save the value into a variable by simply using pv!Result.body.credentials.token