[jQuery] How to add an element to an object?

2009-07-14 Thread yasmine
Hi, am very new to jquery and I want to do something that I suppose is very easy but I can't figure out how to do it If I have something like this: var d = {one:1, two:2, three:3}; and I want to add a new item to d, how can I do it? I have looked up the documentation and found the function

[jQuery] Re: How to add an element to an object?

2009-07-14 Thread yasmine
Thanks, I didn't know about the javascript associative arrays.

[jQuery] Adding items to the json result of the autocomplete plugin

2009-07-14 Thread yasmine
I am using the tokenizing autocomplete text entry which expects the search result in json format I want to know if it's possible to add items to the json collection using jquery, if I have for example var results = [{id:1,name:Abb}, {id:2,name:Abbas}, {id:3,name:Abd}, {id:4,name:Abdel}] and