let attachId = 123;
let list = [
{ attachId: 123, name: "4234" },
{ attachId: 653, name: "234123" },
{ attachId: 434, name: "433335" },
];
// 使用 filter 方法过滤出 attachId 不等于 123 的对象
let filteredList = list.filter(item => item.attachId !== attachId);
console.log(filteredList);