Converting string to javascript object
<p>I want my user to input some text in an input field and click a button "Evaluate" on clicking that button I will convert that inputted text into a JavaScript object if I could and will show all of it's members(properties and functions).</p>

<p>For example if user inputs <code>"document"</code> or <code>"window"</code> I will show all members of <code>document</code> and <code>window</code> respectively.</p>

<p>Iterating through the members of an object is done, but when user inputs some text in input text field and I get that text than that value is treated as String of course how can I convert that text into an object like <code>"document"</code> to <code>document</code> and <code>"window"</code> to <code>window</code> ???</p>
