> field可以不使用`{}`进行字段过滤,以下面示例为例可以写为`.field('book_id.title,book_id.author,quantity as order_quantity')`,此写法于2021年4月28日起支持。副表字段使用别名需要注意,如果写成`.field('book_id.title as book_id.book_title,book_id.author,quantity as order_quantity')` book_title将会是由book_id下每一项的title组成的数组,这点和mongoDB内数组表现一致
副表字段使用别名需要注意,如果写成`.field('book_id.title as book_id.book_title,book_id.author,quantity as order_quantity')` book_title将会是由book_id下每一项的title组成的数组,这点和mongoDB内数组表现一致
```js
constdb=uniCloud.database()
db.collection('order,book')
.where('book_id.title == "三国演义"')
.field('book_id.title as book_title,book_id.author as book_author,quantity as order_quantity')// book_id.title、book_id.author为副表字段,使用别名时效果和上一个示例不同,请见下方说明