codenothing/auto-complete — Issue #10: JSON Format
Author: anteksiler
Created: 2011-11-24 09:19:51+00:00
State: open

Hi there,

I am using the below code to retrieve a list of usernames:

var autoword = $("#sendUserName").val();
$("#sendUserName").autoComplete({
ajax: 'ajaxurl/',
postVar: 'fragment',
autofill: true,
minChars: 2,
maxItems: 10
});

But the returning jSON data is formatted like:
{"status":"ok","context":[{"name":"User1","company":0},{"name":"Company1","company":1},{"name":"Company2","company":1}]}

How can I render this data?