ContributionsMost RecentMost LikesSolutionsRe: Need to know how to compare two json response one with json object and other with json array . thaks this is awesome. Re: Need to know how to compare two json response one with json object and other with json array .can some one help me hereRe: Need to know how to compare two json response one with json object and other with json array .Can you help me how to do this for all objects if possible.Re: Need to know how to compare two json response one with json object and other with json array . Can some one help.PFA the test files. Need to know how to compare two json response one with json object and other with json array .SolvedRe: how to use a variable in context.expandThanks it is working nowRe: how to use a variable in context.expandThat was not working actuallyhow to use a variable in context.expand Can u tell me how to use a variable inside this. def y =1; def g = context.expand('${Operation#Response#//*//consumerProfile/phoneNumber["+y+"]}'); this is not taking 1 as value of y SolvedRe: Count the number of tags Hi, Actually my intention is to read the respone from <phonenumber> to </phone number> for the two occurences and write to a text file instead of using it as a string and storing like how u did .Please assit Re: Count the number of tags Thanks it worked but I need one more help. I need to get the entire xml from the <phone number> tag to </phone number> as there are two occurences for them. i used the below script. def response = groovyUtils.getXmlHolder("Operation#Response"); response.namespaces["ns1"] = "http://moneygram.com/core/service/OrchestrateGetUCP1705"; for (int y=0;y<count;y++) { def i2 = response["//*/consumerProfile/phoneNumber["+y+"]"]; log.info i2; } i used the below as well and didnt work. def g = context.expand('${Operation#Response#//*//consumerProfile/phoneNumber["+y+"]}'); XML: <phoneNumber> <countryDialInNumber>1</countryDialInNumber> <mobileFlag>true</mobileFlag> <phoneNumber>5128797895</phoneNumber> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>PRM</type> <notificationPreference> <method>SMS</method> <optIn>false</optIn> <preferredLanguage>en-US</preferredLanguage> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>TXNN</type> </notificationPreference> <notificationPreference> <method>SMS</method> <optIn>true</optIn> <preferredLanguage>en-US</preferredLanguage> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>MKTN</type> </notificationPreference> </phoneNumber> <phoneNumber> <countryDialInNumber>1</countryDialInNumber> <mobileFlag>true</mobileFlag> <phoneNumber>6124045907</phoneNumber> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>SEC</type> <notificationPreference> <method>SMS</method> <optIn>false</optIn> <preferredLanguage>en-US</preferredLanguage> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>MKTN</type> </notificationPreference> <notificationPreference> <method>SMS</method> <optIn>false</optIn> <preferredLanguage>en-US</preferredLanguage> <startDate>2018-10-19T21:10:52-05:00</startDate> <stronglyAuthenticated>false</stronglyAuthenticated> <type>TXNN</type> </notificationPreference> </phoneNumber>