title: Mapping array of object values to Interface type in Typescript
body: <p>I have an array called dealers in a JSON document that contains several object as shown below.</p>
  
  <pre><code>"dealers" : [ 
      {
          "name" : "BMW Dealer",
          "country" : "Belgium",
          "code" : "123"
      },
          {
          "name" : "Audi Dealer",
          "country" : "France",
          "code" : "124"
      },
          {
          "name" : "VW Dealer",
          "country" : "Germany",
          "code" : "125"
      }
  ]
  </code></pre>
  
  <p>I also have an interface type as shown below and a variable of this interface type.</p>
  
  <pre><code>interface IDealer extends IZone {
      dealerName: string;
      dealerCode: string;
      dealerCountry: string
  }
  
  var countryDealers IDealer;
  </code></pre>
  
  <p>I'd like to iterate through the dealers array of objects and populate the countryDealers variable.</p>
  
  <p>How can I achieve this please?</p>