cementedmind / jquery-load-json

Automatically exported from code.google.com/p/jquery-load-json
0 stars 0 forks source link

Problem with Hierarchical JSON objects - variable scope issue causing duplication of parent data #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
First off, Great code - A HUGE time saver!

I have found that some Hierarchical data scenarios cause your code to produce 
unexpected results.  It looks like a bug with the scope of your variables in 
the BrowseJSON() function source lines 120,128, and 140 your for() loops do not 
have var declarations to make them local on the counters (iExist, iCreate and i 
respectively), which when called iteratively can cause some unexpected 
duplication of parent rows due to the lingering of previous values.

Once those are made local, things appear to work okay.

Thanks for the code!

Original issue reported on code.google.com by transien...@gmail.com on 11 Sep 2011 at 2:58

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for this update. in the version 1.2 I have fixed this and added few more 
functionalities/examples.

Jovan

Original comment by joc...@gmail.com on 24 Sep 2011 at 11:23

GoogleCodeExporter commented 8 years ago
I'm closing this issue.

Original comment by joc...@gmail.com on 27 Sep 2011 at 1:18