【发布时间】:2021-01-19 23:49:22
【问题描述】:
这是我的 json 文件的样子:
{
"count": 12,
"name": "Daily Ticket",
"columnNames": [
"User",
"Channel",
"Date",
"# of Closed Incidents",
"Open",
"Response",
"Remark",
"Closed"
],
"rows": [
[
"abc",
"Service Web",
"\u00272020-06-13 00:00:00\u0027",
"1",
"0",
"0",
"this is a text,please replace with null",
"1"
],
[
"xyz",
"Email",
"\u00272020-06-13 00:00:00\u0027",
"21",
"1",
"0",
"this is a text,please replace with null",
"7"
]
]
}
我想将 Remark 列中的所有值替换为 null 并使用 powershell 转换为 csv 文件。请帮助实现这一目标。
我希望列名作为标题,行作为在 csv 中用逗号分隔的行。 我的输出 csv 文件应如下所示:
User,Channel,Date,# of Closed Incidents,Open,Response,Remark,Closed
abc,Service Web,\u00272020-06-13 00:00:00\u0027,1,0,0,,1
xyz,Email,\u00272020-06-13 00:00:00\u0027,1,0,0,,1
【问题讨论】:
标签: json powershell csv