let activities = [
['Work', 9],
['Eat', 1],
['Commute', 2],
['Play Game', 1],
['Sleep', 7]
];
Code language: JavaScript (javascript)
const IDs = Object.entries(formData?.Recipient).map(([k, v]) => v.map(item => item?.UserID));
this.setState({
selectedUser : IDs.flat()
})
console.log(IDs.flat())