私は "クリア" actionNameのための "countUse" を合計する方法このフィールドの値を合計するにはどうすればよいですか?
{
"actionName": "add_new_paint_layer",
"countUse": 1,
"sources": "smth"
},
{
"actionName": "clear",
"countUse": 1,
"sources": "smth"
},
{
"actionName": "clear",
"countUse": 5,
"sources": "smth"
},
のような構造体を持っていますか?
https://docs.mongodb.com/manual/reference/operator/aggregation/sum/とhttp://godoc.org/labix.org/v2/mgo#Collection.Pipe –
あなたがありますあなたの試みを示すコード?試してみると何がうまくいかなかったのですか? – Flimzy