[Vuejs]-Remove First and Last double Quotes from "["Morning Shift","Day Shift"]"

3👍

You can try using JSON.parse():

The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string.

Demo:

var data = `["Morning Shift","Day Shift"]`; 

data = JSON.parse(data);
console.log(data);

Leave a comment