'Set mongoose schema with changing fields
I want to make a mongoose schema that will append timeseries data. I got the idea for that model after reading this (https://www.mongodb.com/blog/post/schema-design-for-time-series-data-in-mongodb) documentation where the main aim is to efficiently store timeseries data.
One of the techniques is to define a timestamp of a particular hour and then append 60 values so that we don't have to make document for each minute.
The data will look like this:

As you can see that in the values part, the object key is changing and is incremented. I want to design a schema that will store data same as in the above picture. My main confusion is that how can I make a schema where the keys in values in changing(0,1,2...). Kindly guide me regarding this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
