Let's say I have below object :
var obj = {
a-0-first : 'value1',
a-0-second : 'value2',
a-1-first: 'value3',
a-1-second: 'value4'
}
I want this :
a : [
{
fisrt : 'value1',
second: 'value2'
},
{
fisrt : 'value3',
second: 'value4'
}
]
How can I convert the object in JavaScript?