Is there any underscorejs function (or native/custom js function) that transforms this struct :
(please get a look at the real example @Jsfiddle)
//Simple version, check Jsfiddle for the complete one
var object = {
"users" : [
{
name : "name1"
},
{
name : "name2",
}
]
}
to another object like this :
//Simple version, check Jsfiddle for the complete one
var object2 = {
users : {
name : "name1, name2"
}
}