How can we use brackets in an #EVAL statement? I wasn't able to find the answer in the documentation. Simple example: #EVAL [ var x = new Array(11,12,13); return x[1]; // the closing bracket generate an error. ]
EVAL was designed for rather simple formulas. We do not anticipate usage of [] inside EVAL. Perhaps you can use embedded hosted JS files of API,
I used the slice function to simulate the array brackets.
Still, it would be nice to add an escape caracter as an additional feature ( like \] ).
#EVAL [
var x = new Array(11,12,13);
return x.slice(1,2); // returns 12
]