Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
Replies
9 replies
Answers
1 answer
Subscribers
10 subscribers
Views
10386 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Get Data From Json and Save Into a Variable
harshav
over 8 years ago
Hi All,
I was able to get the data from external System with a!httpQuery and using a!fromJson() I could able to get the data in the below format.
[{"EMP_ID":1,"EMP_NAME":"ABC","ORG":"VPC","MANAGER_CONTACT_NAME":"My Name"}],
So could someone help me how to save this single text value, into a CDT or basically what I want is the Values for those respective properties.
TIA :)
OriginalPostID-231320
Discussion posts and replies are publicly visible
Parents
0
ajaved
A Score Level 1
over 8 years ago
@harshav - If you are passing this to a process and the process has variables with same names set as parameters then you only need to do the following, this will extract and map.
\tprocessParameters: a!fromJson(http!request.body)
If you need to create a CDT from JSON then use cast function and whichever fields match will be populated.
local!value: cast(
\t'type!{urn:com:appian:types:SAN}SAN_Process_Input',
\ta!fromJson(http!request.body)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
ajaved
A Score Level 1
over 8 years ago
@harshav - If you are passing this to a process and the process has variables with same names set as parameters then you only need to do the following, this will extract and map.
\tprocessParameters: a!fromJson(http!request.body)
If you need to create a CDT from JSON then use cast function and whichever fields match will be populated.
local!value: cast(
\t'type!{urn:com:appian:types:SAN}SAN_Process_Input',
\ta!fromJson(http!request.body)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data