title: Iterate through each child div of a specific class (cheerio)
body: <p>I want to get the text for <em>each</em> child div <strong>'roster__item roster__item--flex 4/12 palm-1/1'</strong>. I don't know why my code isn't working and I would love some help. I want to <em>iterate</em> through each child div (with the name provided above) and add this text (whether it's there or not) to an object.</p>
  <p>It is very important that we start from the parent <strong>roster roster-palm 1/1</strong> because there are many other places in the HTML response (that I haven't added) that has the child name.</p>
  <pre><code>  $('.roster.roster-palm.1\\/1').each((i, el) =&gt; {
      el.children.forEach((item) =&gt; {
        // find that div here. How do I do it?
        tracking.tracking_update.checkpoints[i].city = item.data.trim()
      })
    })
  </code></pre>
  <hr />
  <pre><code>&lt;div class=&quot;roster roster-palm 1/1 tnt-even&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;Colis livr&amp;#233;&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;02/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12:08&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;roster roster-palm 1/1 tnt-odd&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;D&amp;#233;part en livraison&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;02/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08:06&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;TREMBLAY&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;roster roster-palm 1/1 tnt-even&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;Arriv&amp;#233;e &amp;#224; l&amp;#39;agence de destination&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;02/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06:09&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;TREMBLAY&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;roster roster-palm 1/1 tnt-odd&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;Colis pris en compte par l'agence TNT&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;01/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21:08&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;CAEN&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;roster roster-palm 1/1 tnt-even&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;Colis en cours d&amp;#39;acheminement&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;01/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20:00&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;roster roster-palm 1/1 tnt-odd&quot; style=&quot;padding-top: 11px; padding-bottom: 11px; padding-left: 28px;&quot;&gt;
      &lt;div class=&quot;roster__item roster__item--flex 5/12 palm-1/1&quot; style=&quot;white-space: normal&quot;&gt;Colis chez l'exp&amp;#233;diteur&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 3/12 palm-1/1&quot;&gt;01/09/2020 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00&lt;/div&gt;
      &lt;div class=&quot;roster__item roster__item--flex 4/12  palm-1/1&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>