Javascript Loop Through Array Of Objects And Get Value