title: Working with an array within an array - Swift
body: <p>I have an array of books. 
  Books have a title and characters.
  Characters have a name and age.
  Both Book and Character are structs.</p>
  
  <p>When my App launches a set of default Books is created (the user will also add their own later.</p>
  
  <p>here is my basic code:<br>
  (NOTE: The ???? is a placeholder for the code I can't solve.)</p>
  
  <pre><code>struct Character {
      var name: String
      var age: Int
  }
  
  struct Book {
      var title: String
      var characters: [Character]
  }
  
  var books: [Book] = []
  
  func createBooks() {
      books.append(Book(title: "My Book1", characters: ????)
  
  }
  </code></pre>
  
  <p>I know I could probably create an array of characters and assign with </p>
  
  <pre><code>books.append(Book(title: "My Book1", characters: [character[0], character[3]])
  </code></pre>
  
  <p>But I'm concerned that handling the two separate arrays will become too difficult in a big list of books, not to mention user created books.</p>
  
  <p>How would I best handle this?</p>