Cannot read property 'length' of undefined

Cannot read property 'length' of undefined

Have an application to concatenate a new blank array with selected objects of another array. The code reads the parameters and values of each object of the initial array. This same code is used for the populated second array. The execution of the code stalls on line 583 of the jquery-latest.js file. The error message says "Uncaught TypeError: Cannot read property 'length' of undefined". 

I saw an earlier post for this error message, but there wasn't much detail and it was closed due to lack of response. 

See attached .txt file for code details, you can change its extension to html. My code appears to stop running on line 46, "$.each(designatedCourse2.collection1, function(key3, value3)". If the 'collection1' is removed, it works fine except, the #10b comment returns [object Object] for the value3 item.

I have run the code in the latest versions of IE and Chrome, both have the same results. My system uses the Windows 7 enterprise edition OS.

Please let me know if the issue is in my code or if your assessment indicates it is an issue in the jquery-latest.js file.

John

"...consultation is the lamp of guidance which leadeth the way, and is the bestower of understanding"