I have an array of objects with nested data that includes product, task, instrument details, and assets. I am attempting to locate a specific instrument by supplier ID and modify its asset values based on a given number.
const data = [
{
// Data for the first product...
},
{
// Data for the second product...
}
];
The goal is to update the assets of the selected instrument in each product entry by multiplying all asset values by a specified number. However, my current function is throwing an error:
Uncaught TypeError: Cannot assign to read only property 'current' of object '#'
How can I resolve this issue and successfully update the data as intended?