Here is the code I am using:
this.selectedMonths = JSON.parse(JSON.stringify(this.selectedMonths));
Once this code runs, `this.selectedMonths` will be properly formatted as a JSON object.
I'm wondering if there is a more efficient way to achieve this. The current method of using both JSON.parse() and JSON.stringify() seems redundant.
Side Note: Simply using JSON.stringify() by itself doesn't work because it adds quotation marks around the entire JSON array. That's why I have to use JSON.parse() to remove those quotations.