Solved
Forum Discussion
nmrao
Champion Level 3
I guess that may not be right way to compare. Because you are putting values into a list and don't know the keys for the same.
Would you please post the sample response of db which needs to be compared?
Would you please post the sample response of db which needs to be compared?
manisha1
4 years agoNew Contributor
I am using MongoDb and values from Db are like that-
[282046477, "asdfg1234","register",282046478,"asdfg1235","not-register",282046479,"asdfg1236","register"]
If RestAPI Response values stored in [Key,Value] format then comparing both the arryList retun 'False'.
please suggest if there is any other solution.
- HimanshuTayal4 years agoCommunity Hero
manisha1 :
So, i don't think that will be any change as mongo will return JSON and in Rest response you will be getting json.
So use JsonSlurper and match node by node.
- nmrao4 years agoChampion Level 3I believe the response is an xml from DB. Isn't it?