Actually, autocomplete works fine with a source that returns only an array of strings. This should work fine for you without changing the actions of your controller:
JavaScript:
$(document).ready(function () { $("#find-child-box").autocomplete({ source: function (request, response) {
Check the jQueryUI auto-complete overview tab to see what data awaits widgets.
For your comment:
As prompted by @Alex, you will have to change the controller action data. You can create the correct array of objects using something like:
return Json(listfromDB.Select(c => new { label = c.Name, ID = c.ID }));
What should generate JSON that looks like this:
[{ label: 'Scott', ID: '1234' }, ...]
Which autocomplete can use correctly. Then at any time ui.item available inside autocomplete event handlers (e.g. select ), you must have access to ui.item.ID
source share