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);
Source:stackexchange.com