How to convert string as object's field name in javascript
<p>I have a js object like:</p>

<pre><code>obj = {
  name: 'js',
  age: 20
};
</code></pre>

<p>now i want to access name field of obj, but i can only get string 'name', so how to convert 'name' to obj's field name, then to get result like obj.name.</p>

<p>Thank you in advance.</p>
