Forum Discussion
Solved
manisha1
6 years agoNew Contributor
My requirement is like that -
1) Store RestAPI Response value in an arrayList.
2) Store DB values in second array List and
3) Compare both the array should return True.
nmrao
Champion Level 1
6 years agoI 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?
- manisha16 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.
- HimanshuTayal6 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.
- nmrao6 years ago
Champion Level 1
I believe the response is an xml from DB. Isn't it?