I'm new in React native and I want to add value inside object array inside another object array. I have data like this :
dataAttribute: [
{
id: 1,
title: 'A',
data: [
{ id: '1', name: 'First Name', type: 'text' },
{ id: '2', name: 'Last Name', type: 'text' },
],
},
{
id: 2,
title: 'B',
data: [
{ id: '1', name: 'Twitter', type: 'text' },
{ id: '2', name: 'Twitter follower', type: 'number' },
],
}
]
and i want add params 'statusSelected == true' inside child array like this:
dataAttribute: [
{
id: 1,
title: 'A',
data: [
{ id: '1', name: 'First Name', type: 'text', statusSelected: true},
{ id: '2', name: 'Last Name', type: 'text' },
],
},
{
id: 2,
title: 'B',
data: [
{ id: '1', name: 'Twitter', type: 'text' },
{ id: '2', name: 'Twitter follower', type: 'number' },
],
}
]