Here is my answer to the query. In this snippet, results
represents a freshly initialized array. The object address
nests within the user object.
response.data.forEach(user => {
results.push({
id: user.id,
name: user.name,
address: user.address.number
})
})
When attempting to access the address object, I encounter an issue where it returns undefined. Can someone help me understand how to properly access it?