let data= [
{
id: "22",
name: "全部",
rtsp: null,
status: null,
videos: [
{
id: "2",
name: "区域一(在线1/总数4)",
rtsp: null,
status: null,
videos: [
// {
// id: "cee0a8b3-2f8c-492b-901b-ba45f43d0514",
// name: "101",
// rtsp: "rtsp://10.15.123.101:8555/MainStream",
// status: 1,
// videos: null
// }
]
},
{
id: "1",
name: "走廊2(在线1/总数4)",
rtsp: null,
status: null,
videos: [
{
id: "03288196-25d4-497a-9dfd-5fdf5bb4f968",
name: "宇视96-01",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "0328196-25d4-497a-9dfd-5fdf5bb4f968",
name: "宇视96-02",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "0325d4-497a-9dfd-5fdf5bb4f968",
name: "宇视96-03",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "-497a-9dfd-5fdf5bb4f968",
name: "宇视96-04",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "0322-25d4-497a-9dfd-5fdf5bb4f968",
name: "宇视96-05",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "0322-25d4-497a-9f5bb4f968",
name: "宇视96-06",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "032b4f968",
name: "宇视96-07",
rtsp: "rtsp://admin:nuctech123@10.15.123.96:554",
status: 1,
videos: null
},
{
id: "1637069316",
name: "大华197-08",
rtsp: "rtsp://admin:nuctech123@10.15.123.197:554",
status: 1,
videos: null
},
{
id: "163706ba-4654-4854-9c05-2f39c17d9316",
name: "大华197-09",
rtsp: "rtsp://admin:nuctech123@10.15.123.197:554",
status: 1,
videos: null
},
{
id: "1611ba-4654-4854-9c05-2f39c17d9316",
name: "大华197-10",
rtsp: "rtsp://admin:nuctech123@10.15.123.197:554",
status: 1,
videos: null
},
{
id: "2e7034bf-179c-4621-a462-c7adf0a6ee7f",
name: "海康196-11",
rtsp: "rtsp://admin:nuctech123@10.15.123.196:554",
status: 1
},
{
id: "2e70c-4621-a462-c7adf0a6ee7f",
name: "海康196-12",
rtsp: "rtsp://admin:nuctech123@10.15.123.196:554",
status: 1
},
{
id: "2edf0a6ee7f",
name: "海康196-13",
rtsp: "rtsp://admin:nuctech123@10.15.123.196:554",
status: 1
},
{
id: "975e44a8-0301-4b12-9aa3-37b323a62321",
name: "海康109-14",
rtsp: "rtsp://admin:nuctech123@10.15.123.88:554",
status: 1,
videos: null
},
{
id: "b81f78fd-b4c2-4b4b-bdbb-094f053bbe7f",
name: "大华88-15",
rtsp: "rtsp://admin:nuctech123@10.15.123.88:554",
status: 1,
videos: null
},
{
id: "b81hgfb4b-bdbb-094f053bbe7f",
name: "大华88-16",
rtsp: "rtsp://admin:nuctech123@10.15.123.88:554",
status: 1,
videos: null
},
{
id: "b81f780b4b-bdbb-094f053bbe7f",
name: "大华88-17",
rtsp: "rtsp://admin:nuctech123@10.15.123.88:554",
status: 1,
videos: null
}
]
}
]
}
];
let getDatas = JSON.parse(
JSON.stringify(data)
.replace(/list/g, "videos")
.replace(/deviceName/g, "name")
.replace(/areaName/g, "name")
.replace(/deviceStatus/g, "status")
);
js改变数组对象属性名
最新推荐文章于 2024-06-11 14:02:19 发布