I've always wonderes by we are limited to number and string variable types. Having objects or arrays would be so amazing. This is a serious limitation to the engine in my opinion.
This rant is because i would to have "something" in C2 that would allow me to do this structure:
{
"training": {
fishes: ["-1", "1", "2", "3"]
},
"Island": {
fishes: ["-1", "4", "5", "7"]
},
}
That json file would be retrieved with Ajax.
How could i do this? using XML
<zones>
<training>
<fish>-1</fish>
<fish>1</fish>
...
Thanks in advance
[EDIT]:
using the xml ideia, i managed to get the fishes for a specific zone seprated by a , doing this:
RegexReplace(
trim(
RegexReplace(
zones.StringValue("/Zones/Training"),
"(<.+>)(.+)(<\/.+>)",
"ig",
"$2,"
)
),
"\s+",
"g",
","
)