Expected Behavior for a!fromJson()

Hi,
We're using JSON strings to populate different SAIL components. Part of our use case involves fetching the length of an array that is stored within the JSON string. Using length() doesn't work in this case, it always returns 1. I've attached an example code snippet demonstrating this. Is this the expected behavior? If so, is there an alternative to length() that will get the correct array length?
I'm attaching screenshots of sample code showing this behavior. The first sample shows an array of length 3, when cast to and back from JSON will return length() = 1. The second sample shows that indexing the same array works as expected, and the final sample is the only workaround I could come up with. I was hoping there would be a cleaner solution than using apply over a casting function.

OriginalPostID-255970


JSON Array Behavior.docx

  Discussion posts and replies are publicly visible