Suppose I have following documents in my collection
{
"_id":ObjectId("562e7c594c12942f08fe4192"),
"tags" : [
{
"tagName" : "fun",
"created" : ISODate("2016-01-22T06:13:56.510Z")
},
{
"tagName" : "cool",
"created" : ISODate("2016-01-22T06:13:56.509Z")
},
{
"tagName" : "good",
"created" : ISODate("2016-01-22T06:13:56.509Z")
}
]
},
{
"_id":ObjectId("562e7c594c12942f08fe4193"),
"tags" : [
{
"tagName" : "super",
"created" : ISODate("2016-01-22T06:13:56.509Z")
},
{
"tagName" : "fun",
"created" : ISODate("2016-01-22T06:13:56.509Z")
}
]
}
I want to search relative tags and want to display tag array only.
How can I query to get the list of tag names?