Modify the value of an element in an array

problem description

how do I modify the value of an element in an array? The name of this property of the array to be modified is the passed parameter.

the environmental background of the problems and what methods you have tried

In the

React project, a public method for modifying values is written, in which the array needs to be modified according to the passed subscript, attribute name, and value

related codes

changeDate = (index, el, value) => {
    let { newData } = this.state;
    newData[index].el = value   //
    
}

what result do you expect? What is the error message actually seen?

for React or rookie, Baidu has not found the answer. Please give me some advice. Thank you.

Apr.01,2021

changeDate = (index, el, value) => {
    let { newData = {} } = this.state;
    newData[index][el] = value; //
    
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d269-2b0b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d269-2b0b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?