任何人都可以帮助我,我的大脑堆积使这个集合到 mapreduce,我如何获得 PurchaseAmount、PurchaseReturnAmount 和 TotalAmount,以“年份”为键。
{
"_id" : {
"OwnerId" : "coba@aja.com",
"SupplierId" : BinData(3,"AYC8In8bFkGYNx34poQLlg=="),
"GroupId" : BinData(3,"mzWBCilngEGd72YpeyijcQ=="),
"ProductId" : BinData(3,"gZ2g/syue06v8b88+0pqRA=="),
"Date" : ISODate("2013-01-15T00:00:00Z")
},
"value" : {
"OwnerId" : "oetawan@dokuku.com",
"Date" : ISODate("2013-01-15T00:00:00Z"),
"SupplierId" : BinData(3,"AYC8In8bFkGYNx34poQLlg=="),
"SupplierName" : "Matahari",
"GroupId" : BinData(3,"mzWBCilngEGd72YpeyijcQ=="),
"GroupCode" : "Umum",
"GroupName" : "Umum",
"ProductId" : BinData(3,"gZ2g/syue06v8b88+0pqRA=="),
"ProductCode" : null,
"ProductBarcode" : "IPAD2",
"ProductName" : "iPad 2",
"PurchaseAmount" : 19500000,
"PurchaseReturnAmount" : 0,
"TotalAmount" : 19500000
}
我想用这个映射减少到 C#