Open Rohit-Jain24 opened 3 years ago
how to put dynamic data to items prop without using {"id":1,"name":React} as key
I got different JSON as it is from Backed Response it doesnt have key as id and name as items are not visible in the list
The same question
you can use map function let taskType = this.props.data.tasks.taskType.map((name,index)=>{ return ({name: ${name},id: ${index}}) }) ;
${name}
${index}
where we should use this in index file
how to put dynamic data to items prop without using {"id":1,"name":React} as key
I got different JSON as it is from Backed Response it doesnt have key as id and name as items are not visible in the list