read an string array as property name? : <pre><code>newDesign = {
    color: 'blue',
    shape: 'round'
}

oldDesign = {
    color: 'yellow',
    shape: 'triangle'
}
</code></pre>

<p>I want to compare this two design to see if their field is changed, so I write these:</p>

<pre><code>fields = [ 'color', 'shape' ]
for (let field in fields) {
    if (oldDesign.field !== newDesign.field)
        console.log('changed')
}
</code></pre>

<p>However, looks like I can't read the value of fields by using oldDesign.field.</p>

<p>Is there a way to to this? Thank you.</p>
