Can you use JS to convert the following string into an array?

the data requested by the background is found to be like this

clipboard.png

can you convert a string in such a format

request Liezi: [Anhui Agricultural University | Botany | Master "," Hunan Institute of Science and Technology | Biological Engineering | undergraduate "]

Nov.25,2021

JSON.parse()

var str = '[" |  | "," |  | "]';
var arr = JSON.parse(str);

this is best transferred from the back end to the JSON array, and then passed to the front end.
because this is not a legal string.


clipboard.png


the front-end time should not be long, JSON.parse () can completely solve the problem you said, and whether it is single-quote or double-quote, it is a string, written differently!


matches the first string " and the last " can be replaced with an empty
your JSON.parse is a conversion syntax error

.
Menu