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
5 replies
Subscribers
7 subscribers
Views
2620 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We have data with format like this : [success:true,result:[values:1; EUR; 1
heriz
over 7 years ago
We have data with format like this :
[success:true,result:[values:1; EUR; 12000];[values:2; AUS; 9000];[values:3; SGD; 9200];[values:4; GBT; 13000];[values:5; MYR; 5000]]
What is the best expression to select all the data of the nested value (values) by index?
What we want is more likely like this:
- Array 1st column : {1,2,3,4,5}
- Array 2nd column : {EUR,AUS,SGD,GBT,MYR}
- Array 3rd column : {12000,9000,9200,13000,50000}
Thanks
OriginalPostID-210980
OriginalPostID-210980
Discussion posts and replies are publicly visible
0
Haley Smith
A Score Level 2
over 7 years ago
When arrays are defined like this without the use of custom data types, Appian collapses the array. Here is a link to the documentation that describes this:
forum.appian.com/.../Expressions.html
You'll have to manipulate the parent array with indexes if you want to grab the data from each nested array.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 7 years ago
Can you please provide me the sample expression to achieve this?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 7 years ago
If I can get the data array become:
[values:1; EUR; 12000];[values:2; AUS; 9000];[values:3; SGD; 9200];[values:4; GBT; 13000];[values:5; MYR; 5000]
How to to grouping the data array by index (as the desire result above)?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Haley Smith
A Score Level 2
over 7 years ago
index(merge({1; "EUR"; 12000},{2; "AUS"; 9000},{3; "SGD"; 9200},{4; "GBT"; 13000},{5; "MYR"; 5000}),1,null)
index(merge({1; "EUR"; 12000},{2; "AUS"; 9000},{3; "SGD"; 9200},{4; "GBT"; 13000},{5; "MYR"; 5000}),2,null)
index(merge({1; "EUR"; 12000},{2; "AUS"; 9000},{3; "SGD"; 9200},{4; "GBT"; 13000},{5; "MYR"; 5000}),3,null)
That will return the three individual chunks from the arrays.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 7 years ago
Yes, it works! Thanks a lot haleys for your help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel