I have an array of objects that i need to convert to a single object. ex:need to convert
var data=[
{
"name": "EMPRESA",
"value": "CMIP"
},
{
"name": "DSP_DIRECAO",
"value": "CMIP@040@1900-01-01"
},
{
"name": "DSP_DEPT",
"value": "CMIP@040@1900-01-01@42@1900-01-01"
},
... ]
to
{
"EMPRESA": "CLCA",
"DSP_DIRECAO": "CLCA@100@1900-01-01",
"DSP_DEPT": "CLCA@100@1900-01-01@100@1900-01-01",
...
}
Turn data[x][name] to propertie and data[x][value] to atribute value Thanks