let array = [
{ id: 1, name: '123' },
{ id: 2, name: '456' },
{ id: 3, name: '678' },
{ id: 4, name: '789' },
{ id: 5, name: '234' }
]
let tempArray= [3, 4]
let date = array.filter(item => tempArray.indexOf(item.id) > -1)
console.log('date', date)
// { id: 3, name: '678' }
// { id: 4, name: '789' }