How can I change the key value in an object when creating an array value while using the map functio