D
D
Dima Sokolov2019-04-14 14:27:08
MongoDB
Dima Sokolov, 2019-04-14 14:27:08

MongoDB get individual fields?

{"_id":"5cb0dfe234a8a30c9c0af127",
"sensors":
[{"value0":0.153,
"value1":-0.306,
"value2":9.807}],
"timestamp":1555095522489,"__v":0}

How to get 4 separate fields from this?
unwind only helps from the array, and the values ​​are still inside the object.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question