Home > database >  Mongo graphs emit after the values of the data format is not unified, beg god help!!
Mongo graphs emit after the values of the data format is not unified, beg god help!!

Time:10-03

code is as follows:
the function map () {
Emit (enclosing shopEntity, enclosing realPayMoney);
}

The function reduce (key, values) {
Return {' v ': values};
}


db. Order_info. Graphs (
Map,
The reduce,
{
Query: {orderStatus: NumberInt (4), shopEntity: {$in: Sherwin [5]}},
Out: "order_test01
"}
)


the result is that

{
"_id" : NumberLong (8),
"Value" : {
"V" : [
"591.3",
"770.0",
]
}
}

{
"_id" : NumberLong (12),
"Value" : {
"V" : [
{
"V" : [
"516.7",
"402.0",
"1197.4"
]
},
"477.7",
"417.0",
]
}
}


returns the nested in the v, solving
  • Related