Parse an Array of Objects in Javascript