After running a particular function, I received the following results:
[
"users[0].name is invalid",
"date is invalid",
"address.ZIP is invalid"
]
I am looking for a way to convert this output from object syntax into something like this:
{
users: [{name: 'is invalid'}],
date: 'is invalid',
address: {
ZIP: 'is invalid'
}
}