Javascript Loop Through Object Array Typescript