2018-07-05|2018-07-05 检查mongo聚合结果是否正常

【2018-07-05|2018-07-05 检查mongo聚合结果是否正常】检查聚合结果是否正常,查看subchannel字段是否被保存:
var testcoll = db.getSiblingDB('Stats').getCollection('robertagg').find().limit(1000);
loop:for (var ldata = https://www.it610.com/article/testcoll; ldata.hasNext(); ) {
var sudata = https://www.it610.com/article/ldata.next();
for (let[i, key]of Object.keys(sudata).entries()) {
if (key.indexOf("subchannel") != -1)
{
print(JSON.stringify(sudata));
break loop;
}
}
}

    推荐阅读