Respected Sir, Due to some missing configurations which I am not able to point out,I am not able to use xslt for now. Is there any other way to achieve this? Using PayloadFactory etc..
{ "Children": [ { "Name": { "Type": "System.String", "Value": "Gayle" }, "Education":{ "Type": "System.String", "Value": "PostGraduate" } }, { "Name": { "Type": "System.String", "Value": "Chris" }, "Education":{ "Type": "System.String", "Value": "Graduate" } }, { "Name": { "Type": "System.String", "Value": "Steve" }, "Education":{ "Type": "System.String", "Value": "PostGraduate" } }, { "Name": { "Type": "System.String", "Value": "Stephen" }, "Education":{ "Type": "System.String", "Value": "Graduate" } } ] } Desired Output : { "Gayle": "PostGraduate", "Chris": "Graduate", "Steve": "PostGraduate", "Stephen": "Graduate" } Thanks, Aditya On Sun, Jan 7, 2018 at 6:23 PM, aditya shivankar < shivankar.adit...@gmail.com> wrote: > Respected Sir, > > I have response from one external service something like below, indicating > children name and education. > Each time i call this service with different input, it returns me few > children( number of children returned could be different each time > depending on my request data ). > > > Service Response(which needs to be transformed) > { > "Children": [ > { > "Name": { > "Type": "System.String", > "Value": "Gayle" > }, > "Education":{ > "Type": "System.String", > "Value": "PostGraduate" > } > }, > { > "Name": { > "Type": "System.String", > "Value": "Chris" > }, > "Education":{ > "Type": "System.String", > "Value": "Graduate" > } > }, > { > "Name": { > "Type": "System.String", > "Value": "Steve" > }, > "Education":{ > "Type": "System.String", > "Value": "PostGraduate" > } > }, > { > "Name": { > "Type": "System.String", > "Value": "Stephen" > }, > "Education":{ > "Type": "System.String", > "Value": "Graduate" > } > } > ] > } > > > Desired Output : > > { > "Gayle": "PostGraduate", > "Chris": "Graduate", > "Steve": "PostGraduate", > "Stephen": "Graduate" > } > > I would like to do this using PayloadFactory or Enrich component. > I cannot use dataMapper,because the actual response from service is too > big and dataMapper GUI hangs and also makes eclipsce to hang forever for > such big jsons. > Please guide. > > With Regards, > Aditya >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev