First I have to admit I haven't got a clear understand of js object,
array and associative array yet.

I'm using jquery form to post a form, and I get back some data in json
form, which is an array containing several fields (status, content,
etc....)

The 'content' is an associative array which can have several elements,
so I'm able to access it like this:

response.content['header'], response.content['body'], response.content
['leftSidebox'], ....

I wonder how I can unset one element in the above array (since i will
have to loop through the rest of the elements and update the
responding html.

I wonder if something like this will work:

response.content['header'] = undefined;

jQuery.each(response.content, function(i, val) {
              if(val !== undefined)
$("#" + i).html(val);
          });

Reply via email to