map method to save object in array atempt