Open burakkilic opened 8 years ago
Hello, the array tree method has 2 versions. small caps version work on document instance.
Get root document and use you can use the doc.getArrayTree(...);
Or YourCollection.GetArrayTree('MongoId', ...);
I'm work on the new version this module with new API.
I used document instance version:
doc.getArrayTree(query, function(err, tree) {
if (err) res.json(err);
return res.json({
type: true,
data: tree
});
});
and children is not sent.
When are you planning to release the new version by the way?
I found getArrayTree will return children if you include parentId in your query.fields.
Hello;
I want to use this query in getArrayTree.
but children is not coming. Where am I wrong?