title: construct json object in Angular with dynamic field names
body: <p>newbie question: is there a better way to construct json object in Angular? Currently I can only do the following:</p>
  
  <pre><code>var fieldName1 = 'name1';
  var fieldValue1 = 'value1';
  var fieldName2 = 'name2';
  var fieldValue2 = 'value2';
  
  //**failed to compile**
  // var result = {{fieldName1:fieldValue1},{fieldName2,fieldValue2}};
  
  var object1 = {};
  object1[`${fieldName1}`] = fieldValue1;
  var object2 = {};
  object2[`${fieldName2}`] = fieldValue2;
  
  var result = {object1, object2};
  </code></pre>
  
  <p>The field names "name1", "name2" are not static values.
  The expected result is:</p>
  
  <pre><code>{
    { name1 : "value1" },
    { name2 : "value2" }
  }
  </code></pre>