Hi,

I have the following JSON data:

{"field1":null,"field2":null,"field3":null,"field4":null,"employees":
["Joe","David"]}

I'm using JQuery autocomplete and just need the values from employees
(Joe and David).

Right now I have this in my JavaScript"

$("#myinput").autocomplete("myaction.action", {
                delay: 10,
                minChars: 3,
                matchSubset: 1,
                matchContains: 1,
                cacheLength: 1,
                autoFill: true,
                formatItem: formatItem
});

function formatItem(row) {
                return row;
};

but what this does is return the entire row (obviously), i.e.:

"{"field1":null,"field2":null,"field3":null,"field4":null,"employees":
["Joe","David"]}"

What do I need to do so that I just get the values from employees?
I've also tried playing around with the parse parameter but can't get
anywhere with it at all.

Cheers!
nic

Reply via email to