Thanks,
But I still do not understand how it works.
If I had more than one date in the sub array, would it be both checked?
I really do not see any problem in sub arrays because from JS point of view array almost same as the object just have numeric keys.
If to any array in JS add non numeric key it automatically converted to object.
because of this here I really cannot understand why “1” cannot not be key. I just could have object like
{
runs: [
{0:55, 1:{"$date": “2020-03-01T10:12:12.000Z”}}
...
]
}
and from JS point of view it should be same as array.
And more obj[“1”] and obj[1] points to the same value rather obj is array or object.
This data design came to save space and time. I moved from sql and had the client that accepts such arrays
in order to not change client and simplify server (and save space and net transferred data) I moved from sql table to such array.