It seems you are mixing an array with an object. You do not have an array. An array can have only integer indices. In your example, you seem to be using some b41573bb and 6c21a507 , which are not integers, so you don't have an array. You have a javascript object with these properties. An array would look like this:
var pubs = new Array(); pubs[0] = ['Albx Swabian Alb Visitor Guide','','15.12.2007 09:32:52',['0afd894252c04e1d00257b6000667b25']]; pubs[1] = ['CaSH','','29.05.2013 14:03:35',['30500564d44749ff00257b7a004243e6']];
Now, when you call .length, you will get the correct number of elements (2).
source share