title: How to get an Array of Objects from Firestore in Swift?
body: <p>In Swift, to retrieve an array from Firestore I use:</p>
  
  <pre><code>currentDocument.getDocument { (document, error) in
    if let document = document, document.exists {
      let people = document.data()!["people"]
      print(people!)
    } else {
      print("Document does not exist")
    }
  }
  
  </code></pre>
  
  <p>And I receive data that looks like this</p>
  
  <pre><code>
  (
    {
      name = "Bob";
      age = 24;
    }
  )
  
  </code></pre>
  
  <p>However, if I were to retrieve the name alone, normally I'd do <code>print(document.data()!["people"][0]["name"])</code>.</p>
  
  <p>But the response I get is <code>Value of type 'Any' has no subscripts</code></p>
  
  <p>How do I access the name key inside that object inside the <code>people</code> array?</p>