I haven't been able to find an answer in any online documentation. Wondering if it's possible to add a new document with a sub-collection in a single operation?
Below is the code I have, it seems to work - but is the correct way to add a sub-collection or are batched writes the only way?
reference?.addDocument(data: ["foo" : "bar"]).collection("path").addDocument(data: ["foo2" : "bar2"], completion: { (error) in
// handle write here
)}