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
8 subscribers
Views
10610 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
JSON Key Lookup
kdimitrov
over 8 years ago
Hi there,
Curious if anyone has any good suggestions on the below problem. We are trying to get the keys from a JSON array object. The keys unfortunately are dates and are dynamic. For example, the below works fine, but it's hard-coding "09/03/2017". Any way to get all the keys from the object properly? Worth noting that index(local!list, 1) does not work in the below case.
=with(
local!json: "{
""09/03/2017"": {
""total"": 5
},
""10/03/2017"": {
""total"": 5
}
}",
local!list: a!fromJson(local!json),
index(local!list, "09/03/2017")
)
OriginalPostID-268859
Discussion posts and replies are publicly visible
Parents
0
shubhamg0005
over 6 years ago
[Try this rule . I have made json from myself and it will gives all the key from Json ]
a!forEach(
items: split(
a!toJson(
{
x: 1,
y: 2,
z: 3
}
),
","
),
expression: split(fv!item,"""")[2])
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
shubhamg0005
over 6 years ago
[Try this rule . I have made json from myself and it will gives all the key from Json ]
a!forEach(
items: split(
a!toJson(
{
x: 1,
y: 2,
z: 3
}
),
","
),
expression: split(fv!item,"""")[2])
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data