【发布时间】:2021-09-26 09:47:33
【问题描述】:
我有一个这样的数组。我想删除className 属性中的row-? 字词。
[
{
type: "text",
name: "text-1632646960432-0",
satir: "1",
className: "form-control col-lg-3 row-1"
},
{
type: "text",
name: "text-1632646974512-0",
satir: "1",
className: "form-control col-lg-6 row-8"
}
]
我想要这样的结果。
[
{
type: "text",
name: "text-1632646960432-0",
satir: "1",
className: "form-control col-lg-3"
},
{
type: "text",
name: "text-1632646974512-0",
satir: "1",
className: "form-control col-lg-6"
}
]
我该怎么做?另外我怎样才能修剪到最后没有空间?
【问题讨论】:
标签: javascript arrays json object