title: Use ternary operator inside object to define it's property
body: <p>Is it possible to decide which property in object is going to be defined depending on condition? For example:</p>
  
  <pre><code>props="{
     'prop1': {label: 'Prop1'},
     hasProp2 ? '(prop2': {label: 'Prop2'}) : ('prop3': {label: 'Prop3'}),
     'prop4': {label: 'Prop4'}
  }"
  </code></pre>
  
  <p>And let's say <code>hasProp2</code> is <code>computed property</code> with a function which returns <code>true</code> or <code>false</code>. How can I use <code>ternary operator</code> or basic <code>if statement</code> inside object or is it even possible?</p>