i have 2 mongoose Schemas like this:
var RecipeSchema = new Schema({
type: String,
version: String,
data: [{type: Schema.ObjectId, ref: 'Data'}]
});
var Recipe = mongoose.model("Recipe", RecipeSchema);
var DataSchema = new Schema({
ex1: String,
ex2: String,
ex3: String
});
var Data = mongoose.model("Data", DataSchema);
if i am working in a function with a "selected" recipe, how can i do the Data.find() to match in the Data Schema only the Datas with the _id that i have in the data array?