I need to compare all the countries present in Response1 should be present in Response2 also. So How Can I take all the countries from both the responses and validate? I tried on storing country in ArrayList but not able to validate it.
Json Response 1:
{
"plan": {
"program": "gtr",
"syter": "yes"
},
"Map": {
"List": [
{
"id": "tyt6577",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "us",
"triag": null
},
{
"id": "yyaqtf6327",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "aus",
"triag": null
},
{
"id": "676hwjsgvhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "rus",
"triag": null
},
{
"id": "676hsdhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "spa",
"triag": null
},
{
"id": "623ujhhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "cha",
"triag": null
}
]
}
}
Json Response 2:
[
{
"id": "tyt6577",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "rus",
"triag": null
},
{
"id": "yyaqtf6327",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "spa",
"triag": null
},
{
"id": "676hwjsgvhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "us",
"triag": null
},
{
"id": "676hsdhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "aus",
"triag": null
},
{
"id": "623ujhhgv",
"proxy": "ENABLED",
"type": "BENEFIT",
"country": "cha",
"triag": null
}
]