i have problem about remote jquery autocompete
i get a json object from the server in this format
[{"id":"4cd8d3b37adf3515c800003e","name":"University of Alberta"},
{"id":"4cd8d3b37adf3515c800003f","name":"Athabasca University"},
{"id":"4cd8d3b37adf3515c8000040","name":"University of Calgary"},
{"id":"4cd8d3b37adf3515c8000041","name":"University of Lethbridge"},
{"id":"4cd8d3b37adf3515c8000042","name":"Mount Royal University"},
{"id":"4cd8d3b37adf3515c8000043","name":"University of Toronto"},
{"id":"4cd8d3b37adf3515c8000045","name":"Queens University"},
{"id":"4cd8d3b37adf3515c8000046","name":"University of Waterloo"},
{"id":"4cd8d3b37adf3515c8000047","name":"McGill University"},
{"id":"4cd8d3b37adf3515c8000048","name":"University of British Columbia"},
{"id":"4cd8d3b37adf3515c8000049","name":"University of Saskatchewan"},
{"id":"4cec8ead7adf3502a100001f","name":"University of Alberta"}]
Now what i need to do is only show the names of the university in the autocomplete list and populate the corresponding id in one hidden field when the user selects the university.
i tried moving aroung formatResult and formatItem with this json object but couldn't figure out how to autocomplete.
It would be helpful if someone explain how to apply formatResult and formatItem methods of jquery autocomplete with json objects
Thanks