I have some data I'd like to display in my front end but its name property is an array of objects, with an object nested in that object. This is how the data is structured in the request:
name: Array [ {…} ]
0: Object { 0: "E", 1: "r", 2: "i", … }
0: "E"
1: "r"
2: "i"
3: "c"
4: " "
5: "C"
6: " "
7: "P"
8: "e"
9: "z"
10: "z"
11: "u"
12: "l"
13: "o"
_id: "6186b6777a38b7da536a6ffd"
<prototype>: Object { … }
length: 1
I can't map through it (userData.name[0].map
) because its not an array.
Whats the correct way to iterate though an object like this and join each letter together?