{
"siteId" : "51",
"thingId" : "0054",
"Date" : 12345450,
"unique" : [
{
"controller" : 12.0,
"module" : 10.0,
"variable" : "curent",
"calculation" : [
{
"min" : "",
"max" : "",
"avg" : "",
"cal" : [
{
"Datetime" : "",
"value" : 345.0
},
{
"Datetime" : "",
"value" : 312.0
},
{
"Datetime" : "",
"value" : 125.0
}
]
}
]
}
],
"thingType" : "",
"moduleType" : 91.0,
"enabled" : 1.0,
"variableType" : "AI",
"updatedTime" : NumberLong(1483209000),
"requestedValue" : "",
"requestedTime" : 0.0
}
在本文档中,我需要找到“cal”数组的“value”字段的main,max和avg,结果放在“计算”数组字段main,max和avg中,我该怎么做?