I have an array of objects:
const action_triggers = [
{
onClick: {
action_id: "1",
},
},
{
onLoad: {
action_id: "2",
},
},
];
How do I convert it into the following by JavaScript?
const action_trigger = {
onClick: {
action_id: 1
},
onLoad: {
action_id: 2
}
}