[jQuery] array problems
[jQuery] array problems
Hello,
I have a problem with arrays. I am getting data from xml and trying to
get data to arrays. Here is my code:
===============================
var monster = [[[]]];
...
$(this).find('monsters').each(function(id2){
monster[pid][id2]['db_id'] = $(this).find('db_id').text();
});
...
===============================
When I am alerting the variable it alerts only the first value and
then stops and in firebug I see this error:
====================
monster[pid][id2] has no properties
[Break on this error] monster[pid][id2]['db_id'] = $
(this).find('db_id').text();
====================
Maybe I have wrongly defined monster variable?