I have an array which i want to change that array item as an object as shown below.
let a=['monkey: animal','John:human', 'Rob:human', 'donkey:animal']
I need output as below;
output={ animal: ['monkey', 'donkey'], human: ['John', 'Rob'] }