删除每个特定JSON名称的双引号

时间:2018-03-26 16:42:10

标签: javascript json

我有JSON,看起来像

{
  "screens": [
    {
      "screenName": "PriceCodes",
      "gridOptionsModel": {
        "columnDefs": [
          {
            "headerName": "enddate",
            "field": "date",
            "editable": true,
            "cellEditorFramework": "BootstrapDatePickerComponent"
          },
          {
            "headerName": "INT",
            "field": "int",
            "editable": true,
            "cellEditorFramework": "NumericEditorComponent"
          }
        ]
      }
    }
  ]
}

并且对于namecellEditorFramework的每次出现,我都希望该名称的值没有双引号,如下所示:

{
  "screens": [
    {
      "screenName": "PriceCodes",
      "gridOptionsModel": {
        "columnDefs": [
          {
            "headerName": "enddate",
            "field": "date",
            "editable": true,
            "cellEditorFramework": BootstrapDatePickerComponent
          },
          {
            "headerName": "INT",
            "field": "int",
            "editable": true,
            "cellEditorFramework": NumericEditorComponent
          }
        ]
      }
    }
  ]
}

请帮我搞定这个结果

0 个答案:

没有答案