JSFiddle - React, Tailwind, and code Playground
HTML
<div id="out"></div>
JavaScript
let arr = [
{name:"John", score: 12},
{name:"Sylvia", score:15},
{name:"Susan", score:22}
];
const reducer = (red, cur) => {
red[cur.name] = cur.score;
return red;
}
let scores = arr.reduce(reducer, {});
/** output **/
let out = document.getElementById("out");
out.innerHTML = JSON.stringify(scores);
console.log(scores);