title: How can I loop the second element in jquery?
body: <p>this is my object of events</p>
  
  <pre><code>let aEvents = [{
    id: '1',
    location: 'asd',
    dates: '2019-12-21 16:00:00-2019-12-21 17:30:00',
    position: '3',
    status: true,
    sessions: [{
      id: '1',
      text: 'Random text',
      startEndDate: '2019-12-21 16:00:00 - 2019-12-21 17:30:00'
    }, {
      id: '2',
      text: 'Random text 2',
      startEndDate: '2017-12-21 16:00:00 - 2019-12-21 17:30:00'
    }]
  }];
  </code></pre>
  
  <p>I have this function where i recive my aEvents. With the append function im changing some html content. Im also printing the results in a table inside a foreach so it creates a new table for each event. The problem come ones I want to acces the sessions. How could I do that?</p>
  
  <pre><code> addEvents = function () {
        let events = this.myEvents;
        let checkedEvents = [];
        let that = this;
  
        var content = this.$('#eventsBox');
        content.find('event-container').remove();
  
        this.$('#check-list input:checked').each(function() {
          checkedEvents.push(that.$(this).data('index'));
          let index = that.$(this).data('index');
  
          content.find('#events-content').append(`
            &lt;div class="event-container"&gt;
              &lt;div class="row"&gt;
                &lt;div class="col-12"&gt;
                  &lt;table class="table" id="eventT"&gt;
                    &lt;thead&gt;
                      &lt;tr&gt;
                        &lt;th scope="col"&gt;ID&lt;/th&gt;
                      &lt;tr&gt;
                    &lt;/thead&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          ${events[index].id}
                          // How can i acces the sessions[index] to print all of them
                          ${events[index].sessions[index].id}
                        &lt;/td&gt;
                 ...
  </code></pre>