Java While Loop Through An Array Javascript Length Of Json