我有以下架构:
var Person = new Schema({
about: { // the array comes from front end
name: {
type: String
},
places: [{
type: String
}]
},
});
...给定值为:
name : 'ram',
places : ['delhi','agra']
在自动填充搜索中,当我输入'del'
时,会显示'delhi,agra'
当我输入'del'
时,如何让它仅显示'delhi'
?