I have a data similar to the below in my mongo DB. Obviously the length of array1 is two and I am looking on a way to count the length of such array with mongo db script. Thanks
{
"_id" : ObjectId("65465465465465465468"),
"header" : {
"test" : "test",
},
"value" : 11.763548134011048,
"array1" : [
{
"q" : {
"value" : 250
}
},
{
"q" : {
"value" : 30,
}
}
],
"array2" : [ ]
}