title: Using dictionary values to populate collectionView's label inside of a tableView
body: <p>So I have a <code>collectionView</code> inside of a <code>tableView</code>. I would like to use the values from my array to populate each labels text inside each <code>collectionViewCell</code>. If I print the code below in <code>collectionView</code> <code>cellForItemAt</code> I get the below (see picture) (and obviously index out of range):</p>
  
  <pre><code>Print(array[indexPath.row].details.values)
  </code></pre>
  
  <p>So using the example from the photo, how can I get the following:</p>
  
  <ul>
  <li>Outer tableViewCell (1)
  
  <ul>
  <li>CollectionViewCell (1)
  
  <ul>
  <li>label - "1"</li>
  </ul></li>
  <li>CollectionViewCell (2)
  
  <ul>
  <li>label - "3"</li>
  </ul></li>
  <li>CollectionViewCell (3)
  
  <ul>
  <li>label - "5"</li>
  </ul></li>
  </ul></li>
  <li>Outer tableViewCell (2)
  
  <ul>
  <li>CollectionViewCell (1)
  
  <ul>
  <li>label - "7"</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Also as you may of noticed its the array is not in order, is it possible to reorder so its:</p>
  
  <p>["1": 1, "2": 3, "3": 5]</p>
  
  <p>Any help is greatly appreciated, many thanks!!</p>
  
  <p><strong>My Array:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/pNTFR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pNTFR.png" alt="Data to display in label"></a></p>