Use model.find() to Search Your Database

I am getting this error

// running test
E11000 duplicate key error index: darkbox.people.$favoriteFoods_1 dup key: { : “pizza” }
// tests completed

This the link to the challenge and my code.


I am also getting similar error while querying. I read in stackOverflow for similar duplication errors I should use sparse or unique indices while creation but I don’t have any idea on the two.