Given the following array of objects, find the difference in age between the oldest and youngest family members, and return their respective ages and the age difference.
const input = [
{
name: "Hoa",
age: 20,
},
{
name: "Hiep",
age: 50,
},
{
name: "Duc",
age: 45,
},
{
name: "Nhat",
age: 67,
},
]
Expected output is: [20, 67, 47]