Add element when object pushed to array.