简体   繁体   中英

In Typescript, how do I convert a string of strings as an array of strings?

Probably similar to other questions. My example string looks like this: "['one', 'two', 'three']" Can I do it without resorting to Regex or so?

Thanks!

your example string is almost valid JSON, so smth like playground

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM