Hello!
I've just tried the example given in the documentation for how to use json-arrays with the "op_call" methode. However, the function doesn't seem to work, I always get an exception.
I'll copy the code here:
void main() {
string data = """[[["Colorado", "Kansas", "Minnesota"]]]""";
json_array@ arr = parse_json(data);
string location = arr("0.0.0");
alert("My favorite state is", location);
}
If you have any ideas what I could try, please let me know, since I need this function for one of my projects.
Regards
I don't know what you want, but I didn't get results either. What I did was change JSON and access it like this:
void main() {
string data = """["Colorado", "Kansas", "Minnesota"]""";
json_array@ arr = parse_json(data);
string location = arr[1];
alert("Meu estado favorito é", location);
}