Below is the collection in MongoDB by the name- "auto_sales" and I want to select all the values of "sales" from data which is an array of object.
Collection-
{
"name" : "auto_sales",
"data" : [
{ "sales" : 10,
"temp" : 50 },
{ "sales" : 9,
"temp" : 51 },
{"sales" : 8,
"temp" : 55 },
{"sales" : 57,
"temp" : 7 },
{"sales" : 58,
"temp" : 8 }
] }
Is there any query to get all the values of "sales" from "data".