let l = [
    { "name": "A", "age": 12 },
    { "name": "B", "age": 20 },
    { "name": "C", "age": 16 },
    { "name": "D", "age": 30 },
    { "name": "E", "age": 56 },
];

let result = l.reduce( (prev, curr) => { prev[curr.name] = curr.age; return prev;}, {} );
console.log(result); 