title: Printed key and values from a Javascript object is duplicated
body: <p>I have a JSON object in the following format</p>
  
  <pre><code>var myarray = {
    "2020-01-20": ["08:00 - 09:00", "09:00 - 10:00"],
    "2020-01-21": ["08:00 - 09:00"]
  };
  </code></pre>
  
  <p>What I want to do is to print a list with the key following each value of the list. Expected outcome is</p>
  
  <pre><code>2020-01-20 | 08:00 - 09:00
  2020-01-20 | 09:00 - 10:00
  2020-01-21 | 08:00 - 09:00
  </code></pre>
  
  <p>I try to do this with the following code, but I have an unexpected behaviour.</p>
  
  <pre><code>var entries = '';
  $.each(myarray, function(key, value) {
    for (var i = 0; i &lt; value.length; i++) {
      entries += entries + '&lt;div&gt;' + key + ' | ' + value[i] + '&lt;/div&gt;';
    }
  });
  $('#entries').html(entries);
  </code></pre>
  
  <p>Where the outcome is</p>
  
  <pre><code>2020-01-20 | 08:00 - 09:00
  2020-01-20 | 08:00 - 09:00
  2020-01-20 | 09:00 - 10:00
  2020-01-20 | 08:00 - 09:00
  2020-01-20 | 08:00 - 09:00
  2020-01-20 | 09:00 - 10:00
  2020-01-21 | 08:00 - 09:00
  </code></pre>
  
  <p>You can find a jsfiddle here with a <a href="https://jsfiddle.net/arzg4vL0/1/" rel="nofollow noreferrer">reproducable example</a></p>