Tuesday, December 29, 2015

Mapping Json Structure to another Json Structre



sample


ID = ID
incidentStatus.color= StatusColor
incidentPriority.type= PriorityType
flags[i].additionalDataConfiguration.iconURL = ADS[i].IconURL
flags[i].additionalDataConfiguration.type.name = ADS[i].Name


we need to map

var json1 = {
ID = 1
item.color= 'red'
item.type= 'high'
flags[i].details12.iconURL = "www.google.com"
flags[i].additionalXY.type.name = "name"
}

to be

var json2= {
id = 1
itemDetails.color= 'red'
item.type= 'high'
de[i].details12.iconURL = "www.google.com"
de[i].additional12.type.name = "name"
}





1 1-      json2json-master



2  2-      demo_jsonpath-object-transform

No comments:

Post a Comment