Javascript Loop Through Array Of Objects And Create New Array