Loop Through Json Array Javascript Length Function Java