title: Javacript Trouble looping through an Array of object using forEach
body: <p>It doesn't look like I'm able to loop through items at all.
  Was expecting something like this <code>['in', 'STE-00004']</code> as output
  code</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var sales_orders = ['in'];
      var count = 0;
  var items = [
      {name: "STE-00004", sales_order_no: "SAL-ORD-2021-00005"},
      {name: "STE-00003", sales_order_no: "SAL-ORD-2021-00004"},
      {name: "STE-00002", sales_order_no: "SAL-ORD-2021-00004"},
  ]
  
  items.forEach(function(item){
          if(sales_orders.indexOf(item.name) == -1){
              count++;
              sales_orders.push(item.name);
              console.log(sales_orders);
              console.log(count);
          }
      });</code></pre>
  </div>
  </div>
  </p>