Blog

Salesforce – LWC – refreshView

When writing an Aura Lightning Component you can use the following to update data for standard components as detailed on this page: Unfortunately, with Lightning Web Components you cannot run the above code as is. Fortunately, you can easily modify the above to make it work in an LWC. All Read more…

By Chris West, ago
Blog

JSON.parse() Reviver for Dates

Did you know that you can pass a function as the second parameter to JSON.parse()? Doing this causes every key/value pair to be passed to this function for further processing. You can read all about how JSON.parse() and the reviver function works here on MDN’s site. Example Reviver We can Read more…

By Chris West, ago
Blog

JavaScript Snippet – parseJSONC()

Last year I needed a way to be able to parse JSON with comments (also known as JSONC). With that in mind I wrote the following short solution which will essentially remove JavaScript-style comments and trailing commas from the specified JSONC string and then the native JSON.parse() function will parse Read more…

By Chris West, ago