From 962fe292c32d4623d071cce37e59945c52ac2692 Mon Sep 17 00:00:00 2001 From: David Ollerhead Date: Mon, 16 Mar 2015 16:15:37 +0000 Subject: [PATCH] Fixing custom lookup data object --- readme.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 8b50729..1eca232 100644 --- a/readme.md +++ b/readme.md @@ -123,11 +123,13 @@ $('#autocomplete').autocomplete({ lookup: function (query, done) { // Do ajax call or lookup locally, when done, // call the callback and pass your results: - var results = [ - { "value": "United Arab Emirates", "data": "AE" }, - { "value": "United Kingdom", "data": "UK" }, - { "value": "United States", "data": "US" } - ]; + var results = { + "suggestions" : [ + { "value": "United Arab Emirates", "data": "AE" }, + { "value": "United Kingdom", "data": "UK" }, + { "value": "United States", "data": "US" } + ] + }; done(results); },