title: iOS Swift FIrebase: moving data to another firebase ref
body: <p>I have a simple shopping list app backed/synced by a firebase and items added by multiple users. I've created data structs for "GroceryItem" and "Users".</p>
  
  <p>One feature of my app is that you can click the cell and it will put a checkmark next to the item as well as change a bool of "completed" to true.</p>
  
  <p>I'm trying to make a button where it will it will moved all check marked items to a separate list called "history". </p>
  
  <p>Below is one of my many failed attempts at this. I also included the error that XCode is giving me:</p>
  
  <p><em>'Element' (aka 'AnyObject') is not convertible to 'FDataSnapshot'; did you mean to use 'as!' to force downcast?</em></p>
  
  <pre><code>@IBAction func itemsBoughtACTION(sender: AnyObject) {
          ref.queryOrderedByChild("completed").observeEventType(.Value,
              withBlock: { snapshot in
  
          for item in snapshot.children {
              var lastItem = GroceryItem(item)
  
              }
          })
      }
  </code></pre>
  
  <p>EDIT: I just want to data some data already stored in firebase, move it to another firebase location and delete the original.</p>