i have the data like below when i log it in browser console.
const items = getItems(); //this has the logged value
{data: {..}}
data:
outer:
first: []
second: Arrary[2]
0: {id: '1', name: 'name1'}
1: {id: '2', name: 'name2'}
I want the second array of objects so the output should be
second: Array[2]
0: {id: '1', name: 'name1'}
1: {id: '2', name: 'name2'}
i have tried below,
const output = data.outer.second
but says cannot find data.
could someone help me fix this. thanks.