title: typescript anonymous object with variable based label value
body: <p>I followed this link:
  <a href="https://stackoverflow.com/questions/12710905/how-do-i-dynamically-assign-properties-to-an-object-in-typescript">How do I dynamically assign properties to an object in TypeScript?</a></p>
  
  <p>but it shows only how to handle object props names and values with long separate definition of an object.
  I wish to know how to do it with an "on the fly" anonymous built object of any type with no previous definition. 
  I will show it in the following example. </p>
  
  <p>can't make it to work. unfortunately it takes the variable name as the lable and not the variables value as I wish.</p>
  
  <p>here is the code:</p>
  
  <pre><code>var srchTxtlabel: string = '';
  if (this.labelType == '1')
      srchTxtlabel = 'srchtxt';
  else if (this.labelType == '2')
      srchTxtlabel = 'subject';
  
  this.myService.emit({
      srchTxtlabel : this.val1,
      'va2Label' : this.val2
  })
  </code></pre>
  
  <p>Please help...</p>