Salesforce Fact #827 | Adding object in middle in LWC array of objects
In LWC, Many times we deal with the scenario of adding an object conditionally in JS array of objects. And it needs to be added in the middle based on some condition.
In this case the spread operator and the ternary operator combo works together.
Attached is an example screenshot.
Comments
Post a Comment