MongoDB collect / aggregate time series into an array
Following the examples I have two types of data in the same time series db.weather.insertMany( [ { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T00:00:00.000Z"), "temp": 72 },//.... and.. db.weather.insertMany([ { "metadata": {"sensorId": 5578, "type": "humidity" }, "timestamp": ISODate("2021-05018T00:00:001Z"),…