Hey there!
there is a JSON file in a BSON Object looking like the following.
I'm going to add in the marked areas the same attribut. I'm having problems in my loops to get the number of elements from a array. so I can't navigate in it. Only possible way I see is to iterate through every single element of the array and check if the returned value is 0x00 or valid.
Is there a possebilety to get the number of elements in the array?
Any help would be awesome!
thx!
{
"_id" : ObjectId("5705918cb6a7d12aea0525f1"),
//add: "status" : 0
"targets" : {
"fast" : [
{
"size" : "poster",
"format" : "jpg",
"count" : 5
//add: "status" : 0
},
{
"size" : "thumb",
"format" : "jpg"
//add: "status" : 0
}
// more fields of the array could follow here...
],
"slow" : [
{
"size" : "sd",
"format" : "mp4"
//add: "status" : 0
},
{
"size" : "sd",
"format" : "webm"
//add: "status" : 0
}
// more fields of the array could follow here...
]
}}