title: OpenWeatherMap API forecast for only days
body: <p>The problem is when I fetch the URL to get the JSON file of the forecast, it gives me an array of <code>40</code> objects (Forecast every 3 hours for 5 days) now I want to display only everyday forecast and not every 3 hours forecast.</p>
  <p>How can I do it with JavaScript?</p>
  <p>The array:</p>
  <pre><code>{…}
  ​
  city: Object { id: 2643743, name: &quot;London&quot;, country: &quot;GB&quot;, … }
  ​
  cnt: 40
  ​
  cod: &quot;200&quot;
  ​
  list: (40) […]
  ​​
  0: Object { dt: 1580148000, main: {…}, dt_txt: &quot;2020-01-27 18:00:00&quot;, … }
  ​​
  1: Object { dt: 1580158800, main: {…}, dt_txt: &quot;2020-01-27 21:00:00&quot;, … }
  ​​
  2: Object { dt: 1580169600, main: {…}, dt_txt: &quot;2020-01-28 00:00:00&quot;, … }
  ​​
  3: Object { dt: 1580180400, main: {…}, dt_txt: &quot;2020-01-28 03:00:00&quot;, … }
  ​​
  4: Object { dt: 1580191200, main: {…}, dt_txt: &quot;2020-01-28 06:00:00&quot;, … }
  ​​
  5: Object { dt: 1580202000, main: {…}, dt_txt: &quot;2020-01-28 09:00:00&quot;, … }
  ​​
  6: Object { dt: 1580212800, main: {…}, dt_txt: &quot;2020-01-28 12:00:00&quot;, … }
  ​​
  7: Object { dt: 1580223600, main: {…}, dt_txt: &quot;2020-01-28 15:00:00&quot;, … }
  ​​
  8: Object { dt: 1580234400, main: {…}, dt_txt: &quot;2020-01-28 18:00:00&quot;, … }
  ​​
  9: Object { dt: 1580245200, main: {…}, dt_txt: &quot;2020-01-28 21:00:00&quot;, … }
  ​​
  10: Object { dt: 1580256000, main: {…}, dt_txt: &quot;2020-01-29 00:00:00&quot;, … }
  ​​
  11: Object { dt: 1580266800, main: {…}, dt_txt: &quot;2020-01-29 03:00:00&quot;, … }
  ​​
  12: Object { dt: 1580277600, main: {…}, dt_txt: &quot;2020-01-29 06:00:00&quot;, … }
  ​​
  13: Object { dt: 1580288400, main: {…}, dt_txt: &quot;2020-01-29 09:00:00&quot;, … }
  ​​
  14: Object { dt: 1580299200, main: {…}, dt_txt: &quot;2020-01-29 12:00:00&quot;, … }
  ​​
  15: Object { dt: 1580310000, main: {…}, dt_txt: &quot;2020-01-29 15:00:00&quot;, … }
  ​​
  16: Object { dt: 1580320800, main: {…}, dt_txt: &quot;2020-01-29 18:00:00&quot;, … }
  ​​
  17: Object { dt: 1580331600, main: {…}, dt_txt: &quot;2020-01-29 21:00:00&quot;, … }
  ​​
  18: Object { dt: 1580342400, main: {…}, dt_txt: &quot;2020-01-30 00:00:00&quot;, … }
  ​​
  19: Object { dt: 1580353200, main: {…}, dt_txt: &quot;2020-01-30 03:00:00&quot;, … }
  ​​
  20: Object { dt: 1580364000, main: {…}, dt_txt: &quot;2020-01-30 06:00:00&quot;, … }
  ​​
  21: Object { dt: 1580374800, main: {…}, dt_txt: &quot;2020-01-30 09:00:00&quot;, … }
  ​​
  22: Object { dt: 1580385600, main: {…}, dt_txt: &quot;2020-01-30 12:00:00&quot;, … }
  ​​
  23: Object { dt: 1580396400, main: {…}, dt_txt: &quot;2020-01-30 15:00:00&quot;, … }
  ​​
  24: Object { dt: 1580407200, main: {…}, dt_txt: &quot;2020-01-30 18:00:00&quot;, … }
  ​​
  25: Object { dt: 1580418000, main: {…}, dt_txt: &quot;2020-01-30 21:00:00&quot;, … }
  ​​
  26: Object { dt: 1580428800, main: {…}, dt_txt: &quot;2020-01-31 00:00:00&quot;, … }
  ​​
  27: Object { dt: 1580439600, main: {…}, dt_txt: &quot;2020-01-31 03:00:00&quot;, … }
  ​​
  28: Object { dt: 1580450400, main: {…}, dt_txt: &quot;2020-01-31 06:00:00&quot;, … }
  ​​
  29: Object { dt: 1580461200, main: {…}, dt_txt: &quot;2020-01-31 09:00:00&quot;, … }
  ​​
  30: Object { dt: 1580472000, main: {…}, dt_txt: &quot;2020-01-31 12:00:00&quot;, … }
  ​​
  31: Object { dt: 1580482800, main: {…}, dt_txt: &quot;2020-01-31 15:00:00&quot;, … }
  ​​
  32: Object { dt: 1580493600, main: {…}, dt_txt: &quot;2020-01-31 18:00:00&quot;, … }
  ​​
  33: Object { dt: 1580504400, main: {…}, dt_txt: &quot;2020-01-31 21:00:00&quot;, … }
  ​​
  34: Object { dt: 1580515200, main: {…}, dt_txt: &quot;2020-02-01 00:00:00&quot;, … }
  ​​
  35: Object { dt: 1580526000, main: {…}, dt_txt: &quot;2020-02-01 03:00:00&quot;, … }
  ​​
  36: Object { dt: 1580536800, main: {…}, dt_txt: &quot;2020-02-01 06:00:00&quot;, … }
  ​​
  37: Object { dt: 1580547600, main: {…}, dt_txt: &quot;2020-02-01 09:00:00&quot;, … }
  ​​
  38: Object { dt: 1580558400, main: {…}, dt_txt: &quot;2020-02-01 12:00:00&quot;, … }
  ​​
  39: Object { dt: 1580569200, main: {…}, dt_txt: &quot;2020-02-01 15:00:00&quot;, … }
  ​​
  length: 40
  ​​
  &lt;prototype&gt;: Array []
  ​
  message: 0
  ​
  &lt;prototype&gt;: Object { … }
  weather.js:78:11
  
  </code></pre>
  <p>And I need it to be not related to the day the user get the data.</p>
  <p>I'm on the free version of openweathermap.</p>