How does mongoose query data based on the id of the subdocument?

  mongodb, question
{
 "_id": "590ad2c78eb79d16bde4a15d",
 "user": "yejia@qq.com",
 "password": "111111",
 "__v": 0,
 "lists": [
 {
 "_id": "590ad2d78eb79d16bde4a15e",
 "update_at": "2017-05-04T07:05:52.174Z",
 "create_at": "2017-05-04T07:05:52.174Z",
 "title": "Test 1",
 "isChecked": [
 false
 ],
 "details": [
 "unfinished"
 ]
 },
 {
 "_id": "590ad3398eb79d16bde4a15f",
 "update_at": "2017-05-04T07:07:28.784Z",
 "create_at": "2017-05-04T07:07:28.784Z",
 "title": "Test 2",
 "isChecked": [
 false,
 false
 ],
 "details": [
 "1232",
 "333"
 ]
 }
 ]
 }

Like this example, if I want to find a subdocument according to its id: “_ id”: “590ad2d78eb79d16bde4a15e”, what should I do? Explain that I will directly use id to query my meeting. What I don’t understand is to query subdocuments with id of subdocuments.

You can view mongoose’s API documentation, chapters on sub_doc operations,http://mongoosejs.com/docs/subdocs.html