nested $.each doesn't work in IE8
Hi,
I've got a strange problem:
with an object like
- {"level1":[{"values":{"level2":"valuelevel2","level2a":"valuelevel2a"},"index":"index1"},{"values":{"level2":"valuelevel2","level2a":"valuelevel2a"},"index":"index1"}]}
if I want to use a nested jquery each, IE8 prints only one 'ok' running this code [reporting an error]:
- $.each(result, function(i, result_wrapper){
- $.each(result_wrapper, function(i, result_values){
- if(result_values["index"] == 'index1' ) {
- document.write("ok");
- } else {
- document.write("ko");
- }
- });
- });
This works with FF and Chrome.
Why? Is there a workaround?
Thanks in advance