How can I build JavaScript instruction dynamically from parameters? -



How can I build JavaScript instruction dynamically from parameters? -

i want build javascript instruction dynamically

the original instruction :

var chou = eval('(' + returnresult + ')').attribute;

i want pass attribute variable possible?

i have tried :

var chou = eval('(' + returnresult + ')').eval(baseentity);

but doesn't work.

i'll optimistic , assume returnresult json.

then can

var chou = json.parse(returnresult)[baseentity];

if it's not json trust source plenty utilize eval, do

var chou = eval('(' + returnresult + ')')[baseentity];

javascript

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -