Javascript Foreach Loop Through Array Matlab Web