What I'm trying to do is use jquery autocomplete and display the title if matches title or keywords This is the code I have but I can't get it to work the way I need it to, I have been able to make it search title if i throw it in a regular array but not title and keywords. Any help would be excellent, thanks in advance.
var VideoNames = [{title: "superman", keywords: "super man hero movie"}]
$("#searchbox").autocomplete({
source: VideoNames,
select: function (event, ui) {
$("#searchbox").val(ui.item.value);
TrainingVideos.search(ui.item.value);
}
});