Database

db={"User":[{"id":"5a934e000102030405000001"},{"id":"id2"}],"Files":[{"name":"1.docx","author":ObjectId("5a934e000102030405000001")},{"name":"2.docx","author":ObjectId("5a934e000102030405000002")}]}

Query

db.User.aggregate([{"$match":{"id":"5a934e000102030405000001"}},{"$project":{"id":{"$toObjectId":"$id"}}},{"$lookup":{"from":"Files","localField":"id","foreignField":"author","as":"files"}},{"$project":{"files":1}}])

Result