views:

140

answers:

1

I have a search action that returns a json response object which is basically serializing an object using json.net's lib.

My collection has a SearchResult object that has 3 properties (rowID, Title, Url).

Should I create another object instead of SearchResult to use with autocomplete plugin?

http://docs.jquery.com/Plugins/Autocomplete

+1  A: 

autocomplete( url or data, [options] ) requires either a one dimensional array or a simple list of single values on separate lines from a remote source.

Locally, you won't be able to use your SearchResult directly, rather you need to create an array to pass to autocomplete( url or data, [options] ).

Remotely, you may provide a different source/action that returns a response that can be read by autocomplete( url or data, [options] ) (which is, a single value on each line).

Dieter