title: React convert props Objects into array then setState
body: <p>I need to convert this props:</p>
  
  <p><a href="https://i.stack.imgur.com/yEApt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yEApt.png" alt="enter image description here"></a></p>
  
  <p>into this array:</p>
  
  <pre><code>this.setState({
              locations: [
                  { label: 'California', value: 'california' },
                  { label: 'Nevada', value: 'nevada' },
              ]
  });
  </code></pre>
  
  <p>originally i was using this <a href="http://jedwatson.github.io/react-select/" rel="nofollow noreferrer">plugin</a> and wanted to replace its default values with my props but cant convert it.</p>