使用josn 在js中去除引号
数据格式 如下 :
[{ "description": "接口编码",
"fieldName": "partner",
"fieldType": "String",
"require": true,
"requireYesOrNo": "Y" },
{ "description": "随机字符串,长度不超过32字符",
"fieldName": "noncer",
"fieldType": "String",
"require": true,
"requireYesOrNo": "Y" }]
参考方案
let arr =[{ "description": "接口编码",
"fieldName": "partner",
"fieldType": "String",
"require": true,
"requireYesOrNo": "Y" },
{ "description": "随机字符串,长度不超过32字符",
"fieldName": "noncer",
"fieldType": "String",
"require": true,
"requireYesOrNo": "Y" }]
this.tableData = JSON.parse(JSON.stringify(arr))