title: Sort a Realm list and persist the result
body: <p>I have a <code>Realm</code> model that contains a list of products:</p>
  
  <pre><code>class StorageArea: Object {
      dynamic var name = ""
      let products = List&lt;Product&gt;()
  }
  </code></pre>
  
  <p>How can I sort the products alphabetically and persist the result in Realm? I cannot find any mutable method on the List class to reorder the elements and persist the ordered result.</p>
  
  <p>I have a <code>TableViewController</code> showing all the products. The user can move products in the <code>tableView</code>, quit the app and restart the app: the ordered list of products is persisted. I am using List.move(from, to) for that.</p>
  
  <p>Now I would like to add an option to sort the products alphabetically or by date. What would you recommend to modify the products list and save it?</p>