SOURCE

var a = ["https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/3c0df4e754fff43d0e4dc4d401d6f112.jpg", "https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/840e97de4ae09ac53753c259c10ce718.jpg", "https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/6af7ce34c09e1e404b4df240b0fc0d6f.jpg", "https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/2e7c33a8b9240ec960852e80d5dbd419.jpg", "https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/1c98d79ab9647c6eb7f075f3a21f9fed.jpg", "https:\/\/qiniu.crmeb.net\/attach\/2021\/10\/18\/1f68c8d029ef9dd80b9a368394aaf54e.jpg"];


var last = JSON.stringify(a);//把json 对象转换为字符,方便搜索出想要的key 和value

var s = last.replace(/[\'\"\\\\b\f\n\r\t\[\]]/g, '');
var strs = s.split(",");
var newarr = strs.map(item => ({"Id":item}));
console.log(newarr)









console 命令行工具 X clear

                    
>
console