I have an array with another nested array I need to map over. I think I almost got it but I am not getting that data back, can only see its an object. Looking at the new index I can see it is looping of the amount of objects in the object array.
Here is what I have currently:
class Menu extends Component {
constructor(props) {
super(props);
const arrayItems = [this.props.items.edges]
arrayItems.map((currentItem, index) => {
console.log("The current iteration is: " + index)
console.log("The current item is: " + currentItem)
return currentItem.map((newCurrentItem, newIndex) => {
console.log("The NEW current iteration is: " + newIndex)
console.log("The NEW current item is: " + newCurrentItem)
return newCurrentItem
})
})
...
}
Here is screenshot of what I can see in my console, which looks promising:
Can someone please point me in correct direction?