08-13-2019 06:00 AM
Hello,
Does anybody know how to get the length of a JSON Array in CCX Scripting?
I have the following JSON:
{
"value": [
{
"item1": 1,
"item2": 2
},
{
"item1": 3,
"item2": 4
},
]
}
So, this is an array of 2 items.
I tried to use the step Get JSON Document Data, using values such as "$.value[length]". This filter works in http://jsonpath.com/, but CCX does not recognize it.
Is there an easy way to get this information? Maybe with a Java step (preferably not importing any Class to CCX).
Thank you,
Bruno
Solved! Go to Solution.
08-13-2019 10:37 AM
08-13-2019 10:37 AM
08-13-2019 11:24 AM
That's it, mate! :)
Thank you so much!!!
Bruno
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide