vendredi 6 mars 2015

how to convert part of json response to map

I have JSON response that looks like this



{"values":
[
{
"type": "NAME",
"match": "EXACT",
more properties here
},
{
"type": "LASTNAME",
"match": "AMBIG",
more properties here
}
] }


how can I convert this to javascript map that contains only type and match properties?


For example



{
'NAME' : 'EXACT' ,
'LASTNAME' : 'AMBIG'
}

Aucun commentaire:

Enregistrer un commentaire