mongoose - Find all subdocuments that match with node.js mongodb -
i have schema looks like: var user = new schema({ id: string, firstname: string, lastname: string, password: string, username: string, position: [{ title: string, location: string, start: string, term:number, description:string, date: {type: date, default: date.now} }] }); i have 2 users, each 2 embedded position documents. user1: "position" : [ { "title" : "business analyst", "location" : "dublin", "start" : "may 2017", "term" : 6, "description" : " lorem ipsum dolor sit amet, consectetur adipiscing elit. vivamus quis erat vitae dsit amet, consectetur adipiscing elit. vivamus quis erat vitae dolor tempus euismod non in mi", "_id" : objectid("58d6b7e11e793c9a506ffe0f") }, { "description&