I have an array of camperIds that I would like to $unwind so I can join them to another table i.e.
{
"_id": "KCnSWrdTurKA9u9",
"startDate": "2017-09-09",
"endDate": "2017-09-30",
"capacity": 30,
"price": 80,
"seatsAvail": 28,
"theme": "FC",
"camperIds": ["MiNXJS3mW873a5ASA", "e7sj7smAoEw6jDc7v"],
"extendedCareList": [{
"camper": "MiNXJS3mW873a5ASA",
"beforeCare": false,
"afterCare": false
}, {
"camper": "e7sj7smAoEw6jDc7v",
"beforeCare": false,
"afterCare": false
}]
}
In a mongo shell I can run the following command to retrieve the data:
db.camps.aggregate([{
$unwind: "$camperIds"
},
{
$lookup: {
from: "campers",
localField: "camperIds",
foreignField: "_id",
as: "camper_List"
}
}
])
I'm not sure how to accomplish this in BIRT or whether it's even possible.
Any insights, tutorials, examples, tips would be appreciated.