I'm using jQuery 1.6
I'm not so good on JavaScript and I need to dynamically create an array having 2 dynamic parameters: json.id
and json.name
.
the array creation should result in :
[
[json.id]
[
json.name,
json.name,
json.name,
etc .....
]
[json.id]
[
json.name,
json.name,
json.name,
etc ....
]
etc ...
]
Then I need to be able to delete a json.id
or a json.id json.name
....
Is there anyone can show me how to do this with all browser's support?
thx [EDITED]
the logic is this: (hoping it's clear :P )
//first ajax call result:
[{json.id_parent:json.name,json.id_parent:json.name,json.id_parent:json.name, etc..}]
//second ajax call results passing the json.id_parent:
[{json.id_parent_child:json.name,json.id_parent_child:json.name,json.id_parent_child:json.name,etc...}]
//now for each call = id_parent create an associative array:
{
id_parent:{id_parent_child,id_parent_child,etc ....},
id_parent:{id_parent_child,id_parent_child,etc ....},
etc...
}