Working with Json Arrays in a Profile Script



I am starting with Adobe Target and I would like to understand some weird things I see playing with the profile scripts.

I am creating and storing a simple list of objects containing. the objects contains just two attributes: one is an string and the other one is an integer.

When I try to get this back from the user parameter the first thing that I see is that the Json is not in a Json format anymore as it changes the ":" with "=", the other thing I see is that the integers has been converted into float.

An example of this would be:

Before storing the parameter: [ { "stringItem" : "item1", "intItem" : 12 },   "stringItem" : "item2", "intItem" : 24 }]

When I get the stored parameter: [ { "stringItem" = "item1", "intItem" = 12.0 },   "stringItem" = "item2", "intItem" = 24.0 }]

And after this I cannot longer work with the attibutes inside, actually I can't event do simple things as trying to get the type of that array element typeof(array[0])

Is there anyone that can explain me how to work with objects stored inside user parameters?



Accepted Solutions (0)

Answers (0)