1const data = [{ name: 'dendi', age: 23 }, { name: 'dhani' }]
2const result = data.filter((v, i) => {
3 if (!Object.keys(v).includes('age')) {
4 Object.defineProperty(v, 'age', {
5 value: 25,
6 writeable: true,
7 enumerable: true
8 })
9 }
10 return v
11})