array = [{
name: "1"
id: '051001'
},{
name: "2"
id: '052001'
},{
name: "3"
id: '051002'
},{
name: "4"
id: '051003'
},
]
array = [{
name: "1"
id: '051001'
},{
name: "3"
id: '051002'
},{
name: "4"
id: '051003'
},
]
const filteredArray = array.filter( el => el.id.substring(0,3) === '051' )