ES6 map an array of objects, to return an array of objects with new keys : <p>I have an array of objects:</p>

<pre><code>[
    {
        id: 1,
        name: 'bill'
    },
    {
        id: 2,
        name: 'ted'
    }
]
</code></pre>

<p>Looking for a simple one-liner to return:</p>

<pre><code>[
    {
        value: 1,
        text: 'bill'
    },
    {
        value: 2,
        text: 'ted'
    }
]
</code></pre>

<p>So I can easily pump them into a react dropdown with the proper keys. </p>

<p>I feel like this simple solution should work, but I'm getting invalid syntax errors:</p>

<pre><code>this.props.people.map(person =&gt; { value: person.id, text: person.name })
</code></pre>
