Jquery ui autocomplete list only showing 'undefined'

Is it just looking for the default label:value items in the json to put in the list? Is there a way to specify what you want in the list as the label and value?

I’ve looked over the ui docs for it, but can’t seem to find an answer, that or I don’t know what I should be looking at.

I’ve got it working (populating the list with correct number of values, putting values in the field after select), it just doesn’t display the options correctly.

Thanks for any assistance on this.

So, here’s the response from the server


[{"user":{"value":2,"label":"whole name"}},{"user":{"value":5,"label":"user whole name"}}]

The whole name value is for example purposes. What I’m not understanding is why this isn’t working.

You can return whatever you want in the JSON, but autocomplete will look for label and value. Can you add the “label” key to your response?