how to change type array object to format object without looping method in vue.js?
example:
// Data Array
data = [
{
id: 1,
token: '123',
name: 'name',
contact: 'lorem ipsum',
},
{
id: 1,
token: '123',
name: 'name',
contact: 'lorem ipsum',
},
]
to
// Format Object
{
id: '',
token: '',
identity: {
name: '',
contact: ''
},
}
thanks