How does MongoDB query return array data?

  mongodb, question

For example, data such as:

 "name": "Bob"
 "friends": [
 "name": "Lucy",
 "age": 18
 "name": "David",
 "age": 17

I want to return such a list:["Lucy", "David"].

In fact, to put it bluntly, I need to use this returned result to conduct a secondary query, such as the information of Lucy and David.

Limits fields,db.DATA.find({ }, { "name" : 1 })