title: Get the value of a variable that is called the same as a property of the JSON
body: <p>I have a project in Typescript where I am trying to get the value of a variable with the same name as a property of a JSON object.</p>
  <p>This is my JOSN:</p>
  <pre><code>let titleSheets = [
    {
       &quot;properties&quot;:{
          &quot;title&quot;:&quot;totalAtm&quot;
       }
    },
    {
       &quot;properties&quot;:{
          &quot;title&quot;:&quot;totalWor&quot;
       }
    }
  ];
  </code></pre>
  <p>These are my variables:</p>
  <pre><code>let totalSer: number = 917,
      totalWor: number = 7237,
      totalAtm: number = 1410,
      totalCt: number = 1039,
      totalSt: number = 27
  </code></pre>
  <p>This is what I am doing:</p>
  <pre><code>let totalAll: Array&lt;number&gt;
  for (let title of titleSheets) {
    //console.log([title.properties.title])
  }
  </code></pre>
  <p>This is what I want to get:</p>
  <pre><code>totalAll = [1410, 7237]
  </code></pre>