I'm using Eval successfully, and was wondering if Appery considers it unsafe and therefore recommends a workaround. Thanks.
I'm using Eval successfully, and was wondering if Appery considers it unsafe and therefore recommends a workaround. Thanks.
Hello,
It's not safe to parse JSON using eval(). It's better to use JSON.parse().
This link may be helpful: https://developer.mozilla.org/en/docs...
Thanks Igor. As shown below I actually use it after parsing. t2 is the response from a database service and V is a string of a db column name. To get the col value I don't believe V as a string can be used-- so that's why I use eval.
var t3 = JSON.parse(t2);
var t4 = "t3[0]." + V;
var t5 = eval(t4);
Hello Robert,
You also may use string conversion for your value: https://developer.mozilla.org/en-US/d...
Thank you Evgene.