xdan / autocomplete

jQuery autocomplete plugin like Google autocomplete
MIT License
256 stars 92 forks source link

arrays of object from server side #25

Open nasr18 opened 8 years ago

nasr18 commented 8 years ago

I'm using your plugmin and its awesome. but only one thing i need to ask. How do i bind arrays of objects from server to the dropdown? For example, if i type "p" means, i will get 30 records from server whick looks like

[{
     _id: 12345,
    name: prank,
    city: India
}, {
    _id:67890,
    name: pink,
    city: India
}, {
   .......
}, and so on..........]

How do i display only name field in autocomplete box? @butschster @xdan