我有这个字符串:
{
"QueryString": null,
"ProjectName": ""24"",
"SeasonName": "",
"MemberName": "",
"CompanyName": "",
"CompanyRole": 0,
"CompanyRoles": "",
"Year": ""
}
我想使用替换函数使它看起来像这样(对于所有包含双引号的值 - 在这种情况下,只有属性 ProjectName 的值具有它):
{
"QueryString": null,
"ProjectName": "\"24\"",
"SeasonName": "",
"MemberName": "",
"CompanyName": "",
"CompanyRole": 0,
"CompanyRoles": "",
"Year": ""
}
我该如何在 JavaScript 中执行此操作?