title: React.js pass object key-value pairs as props
body: <p>I often find myself doing something like this in my jsx:</p>
  
  <pre><code>myObject= {key1 : 'value1', key2 : 'value2'};
  var reactElement = &lt;MyReactElement key1={myObject.key1} key2={myObject.key2}/&gt;;
  </code></pre>
  
  <p>Is any infrastructure provided to allow me to pass all the key value pairs in my object, as props to an element? I'm aware I can pass in the entire object, but it doesn't feel maximally elegant, especially if it's the only thing I'm passing, since I then have to refer to <code>this.props.myObject.key1</code>.</p>