let data = [
{id: 1, country: 'Germany', population: 83623528},
{id: 2, country: 'Austria', population: 8975552},
{id: 3, country: 'Switzerland', population: 8616571}
];
let dictionary = Object.assign({}, ...data.map((x) => ({[x.id]: x.country})));
// {1: "Germany", 2: "Austria", 3: "Switzerland"}
// Convert array string to dictionary, ex: ['choice_a', 'choice_b'] => {choice_a: true, choice_b: true }
const paramsChecked = Object.assign({}, ...listChecked.map((x) => ({[x]: true})))