如何从字符串数组中删除引号

So after JSON.stringify an array with object,

I have this result [{"title":"Unavaible","start":"2020-05-19","end":"2020-05-22"}].

But the title, start, end I would like them without with the " " anyone knows how I can remove them somehow?

评论
laut
laut

I wouldn't recommend it because that is the proper format of JSON, but I found some code from this answer which will do it.

var someStr = 'He said "Hello, my name is Foo"';
console.log(someStr.replace(/['"]+/g, ''));
点赞
评论