Forum Discussion
manisha1
New 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
5 years agoChampion 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?
- manisha15 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.
- HimanshuTayal5 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.
- nmrao5 years agoChampion Level 3I believe the response is an xml from DB. Isn't it?
Related Content
- 8 years ago
- 9 years ago
Recent Discussions
- 3 hours ago
- 17 days ago