Here is an example of autocomplete with JSON data: http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/json.html
You have to follow it along quite closely - that API for working with JSON is still rather ugly. Jörn On Wed, Nov 12, 2008 at 2:25 AM, nic <[EMAIL PROTECTED]> wrote: > > 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 >