我现在有这些代码:
OneCollection.find({}, {fields: {'oneFiled.child1': 1}});
OneCollection.find({}, {fields: {'oneFiled.child2': 1}});
但我想给一个动态的子文件名。
let childfield = "child1";
OneCollection.find({}, {fields: {'oneFiled.childfield': 1}}); // How to write this one?
如何动态给出归档名称?谢谢