【发布时间】:2015-05-04 16:12:23
【问题描述】:
我有一系列这样的裤子:
{
color: 'Red',
'material': 'Cotton',
size: '33x44'
},
{
color: 'Red',
material: 'Cotton',
size: '38x46'
} // etc.
是否可以创建一个查询来返回所有未更改的信息(material 和 color)以及所有更改的属性的列表(size)。
我猜这看起来像:
Shirts.find(sizes, {color: 'Red'}, function (err, sizes) {
// Just pseudocode here
}).distinct()
但这只是对伪代码的一次非常粗略的尝试。
【问题讨论】:
-
你愿意付多少钱?
-
使用聚合框架