var data = [{type: 'physical', value: 'verified'},
{type: 'reference', value: 'owner'},
{type: 'physical', value: 'pending'},
{type: 'document', value: 'pending'}
]
How to return object in such a way which should have unique key which store mulpltiple values
Expected Result =
var data = {
physical: ['verified', 'pending'],
reference: ['owner'],
document: ['pending']
}