title: Typescript : Property does not exist on type 'object'
body: <p>I have the follow setup and when I loop through using <code>for...of</code> and get an error of :</p>
  <blockquote>
  <p>Property &quot;country&quot; doesn't exist on type &quot;object&quot;.</p>
  </blockquote>
  <p>Is this a correct way to loop through each object in array and compare the object property value?</p>
  <pre><code>let countryProviders: object[];
  
  export function GetAllProviders() {
     allProviders = [
        { region: &quot;r 1&quot;, country: &quot;US&quot;, locale: &quot;en-us&quot;, company: &quot;co 1&quot; },
        { region: &quot;r 2&quot;, country: &quot;China&quot;, locale: &quot;zh-cn&quot;, company: &quot;co 2&quot; },
        { region: &quot;r 4&quot;, country: &quot;Korea&quot;, locale: &quot;ko-kr&quot;, company: &quot;co 4&quot; },
        { region: &quot;r 5&quot;, country: &quot;Japan&quot;, locale: &quot;ja-jp&quot;, company: &quot;co 5&quot; }
     ]
  
     for (let providers of allProviders) {
        if (providers.country === &quot;US&quot;) { // error here
           countryProviders.push(providers);
        }
     }
  }
  </code></pre>