#include#include#include#include#include//爱心点的结构体structPoint{ doublex,y;//坐标 COLORREFcolor;//颜色};//COLORREFcolors[7]={RGB(255,32,83),RGB(252,222,250),RGB(255,0,0),RGB(255,0,0),RGB(255,2,2),RGB(255,0,8),RGB(255,5,5)};COLORREFcolors[7]={RGB(55,132,183),RGB(252,222,250),RGB(25,120,130),RGB(25,5,215),RG
查询:db.trace.aggregate([{$unwind:"$likes"},{$group:{_id:{"name":"$name"}}}]);Mongo集合:"likes":[{"category":"test1","name":"test1","created_time":"2014-01-08T20:50:02+0000","id":"14157481053234234"},{"category":"Publisher","name":"CityPulse","created_time":"2014-01-06T22:46:19+0000","id":"169217625