I have an array of id's authorIds=["1","2",3","4"]. I have another array that holds the reference to the authorIds. ex:
book=[
{
bookId:"abcd",
authorId:"1"
},
{
bookId:"def",
authorId:"1"
}
{
bookId:"ghi",
authorId:"2"
}
{
bookId:"kjl",
authorId:"1"
}
];
now i would like to use the In query (mongodb C# drvier) but want to restrict the number of books to 5 for each author. Can someone tell me how to do this.