Resolve 'Cannot assign to read only property' error in LWC.

I stumbled upon this error when I was using data-table with checkboxes and I wanted to updated the selected property to true in main wrapper object. This issue generally occurs when your variable has some complex structure like object inside object.