Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let results: EventLoopFuture<[Document]> = tXCollection.find().getAllResults()
- return results.map({ documents in
- for document in documents {
- let object = try BSONDecoder().decode(TX_JSON.self, from: document)
- print(object)
- objects.append(object)
- }
- return objects
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement