function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Avik Mukherjee 16Avik Mukherjee 16 

I am getting error when ever i am trying to update a object in an object array in LWC


When ever i am trying to update a value in the object array i am greeting script error, even splice does not works below are two snippets in lwc js.

let allValues=this.budgetData; // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues) ); for(let i = 0; i < allValues.length; i++){ if(allValues[i].Id === event.target.name ){ // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues[i]) ); allValues.splice(i,1); } }



let allValues=this.budgetData; // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues) ); for(let i = 0; i < allValues.length; i++){ if(allValues[i].Id === event.target.name ){ // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues[i]) ); allValues[i]= objectvalue; } }
akshaya vengalaakshaya vengala
appvalley (https://apkmist.com/appvalley-apk/)
One more interesting specialty of this app.