Question: JAVA HELP: With the following sample JSON data: How can I (i.) list the bordering countries names for each country and (ii.) answer the question

JAVA HELP:

With the following sample JSON data:

How can I (i.) list the bordering countries names for each country and (ii.) answer the question whether two countries are bordering or not.

JSON:

"worldCountries" : [{ "id" : 1, "name" : "Turkey", "population" : 79000000, "cities" : [{ "id" : 11, "name" : "Ankara", "population": 5000000 },{ "id" : 12, "name" : "Istanbul", "population": 15000000 }] },{ "id" : 222, "name" : "Greece", "population" : 10000000, "cities" : [{ "id" : 223, "name" : "Athens", "population": 660000 },{ "id" : 202, "name" : "Patras", "population": 170000 }] }],

"bordering" : { "1" : [2], "2" : [1] } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!