Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. let results: EventLoopFuture<[Document]> = tXCollection.find().getAllResults()
  2.  
  3. return results.map({ documents in
  4. for document in documents {
  5. let object = try BSONDecoder().decode(TX_JSON.self, from: document)
  6. print(object)
  7. objects.append(object)
  8. }
  9. return objects
  10. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement