我在 JSON 中找到以下输出:
[{
"ApplicationView": "",
"Styling": "",
"minwidth": "450px",
"minheight": "350px",
"kendoWindowWidth": "90%",
"kendoWindowHeight": "90%",
"iconSize": "20px",
"viewerToolColor": "#8dcaf7",
"DefaultView": "fit To Screen",
"Email": "",
"To": "ToPerson",
"Subject": "This file is exported from actual program.",
"From": "FromPerson",
"Body": "This file is exported from actual program.",
"Content": "",
"zoomIn": "",
"Icon16": "ZoomIn.png",
"Label17": "Zoom In",
"Visibility18": "true",
"zoomOut": "",
"Icon20": "ZoomOut.png",
"Label21": "Zoom Out",
"Visibility22": "true",
"rotateLeft": null,
"Icon24": "RotateLeft.png",
"Label25": "Rotate Left",
"Visibility26": "true",
"rotateRight": "",
"Icon28": "RotateRight.png",
"Label29": "Rotate Right",
"Visibility30": "true",
"fitToScreen": "",
"Icon32": "fittoscreen.png",
"Label33": "Fit to Screen or Double Click on Image",
"Visibility34": "true",
"fullScreen": "",
"Icon36": "fullscreen.png",
"Label37": "Full Screen or 2 Times Double Click on Image",
"Visibility38": "true",
"saveAs": "",
"Icon40": "download.png",
"Label41": "Full Screen or 2 Times Double Click on Image",
"Visibility42": "true",
"print": "",
"Icon44": "print.png",
"Label45": "Print",
"Visibility46": "true",
"email": "Email",
"Icon48": "email.png",
"Label49": "Send Mail",
"Visibility50": "true"
}]
我想从 JSON 的键中删除数字
示例:icon48
将是icon
.
请指导我这样做。
我试图访问循环json
中的键foreach
并使用正则表达式删除数字,但在执行此操作时没有成功。
帮助将不胜感激。