Is there a packaged function in Mongo java driver that can directly fetch a specific value in a document instead of a document? Or is there a way to do this? ?

  mongodb, question

“user”: “liyang”,



For example, for this document stored in the database, I want to take the value of 7 in count, only take the number 7, and do not need the document. how do I implement it instead? ?

Finally, I converted the json string into a map using jackson, then stripped it layer by layer using the map, and finally returned a value