Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
9 subscribers
Views
3207 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a json output from a http service coming like this. "mes
nitas811
over 10 years ago
I have a json output from a http service coming like this.
"message":{
"validation_errors":"True",
"error_data":{
"push_qa_contact_phone":[
"Missing data"
],
"push_dev_contact":[
"Missing data"
],
"component":[
"The Component in your JIRA Ticket is not eligible for OpenWindow."
],
"push_dev_contact_phone":[
"Missing data"
],
"push_qa_contact":[
"Missing data"
]
}
},
I would like to get all the keys under error_data, the keys could keep changing in output how do I get all the keys in this output and parse through each one of them?
OriginalPostID-147661
OriginalPostID-147661
Discussion posts and replies are publicly visible
Parents
0
Tim
Certified Lead Developer
over 10 years ago
No you will need to know the keys to be able to query the data. The function a!fromJson() will put the data into a dictionary syntax which will make it easier to parse. I also asked if there is a finite list of possible error keys? If so you could create a constant to hold that full array (i.e. push_qa_contact_phone, push_dev_contact etc) and then on each response you could loop over the returned values and use the index() or property() functions to retrieve the values per key
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Tim
Certified Lead Developer
over 10 years ago
No you will need to know the keys to be able to query the data. The function a!fromJson() will put the data into a dictionary syntax which will make it easier to parse. I also asked if there is a finite list of possible error keys? If so you could create a constant to hold that full array (i.e. push_qa_contact_phone, push_dev_contact etc) and then on each response you could loop over the returned values and use the index() or property() functions to retrieve the values per key
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data