From: FAQ server on
-----------------------------------------------------------------------
FAQ Topic - When should I use eval?
-----------------------------------------------------------------------

The ` eval() ` function should _only_ be used when it is necessary to
evaluate a string supplied or composed at run-time; the string
can be anything from a simple (but unpredictable) expression such
as ` "12 * 2.54" ` to a substantial piece of javascript code.

When ` eval( "{'key':value}" ) `, is called, ` "{" ` is executed as a block
of code instead of an object literal. Hence, the Grouping Operator (parentheses)
is used to force ` eval ` to treat the json-string as an object literal
as ` eval( "( + sCode + ")" ); `.

http://json.org/

http://jibbering.com/faq/#propertyAccessAgain

http://jibbering.com/faq/faq_notes/square_brackets.html


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.