Java – Number of Android/Java JSON objects

Number of Android/Java JSON objects… here is a solution to the problem.

Number of Android/Java JSON objects

I parsed a JSON API in android and it looks like this :

 [
   {
     "id":70,
     "number_of_devices":12,
    },
    {
      "id":71,
      "number_of_devices":5,
    }
   ]

Now I want to get the total number of all devices and display it in one TextView, and the total number of all IDs and display it in another TextView.
Can anyone give me an example of how to do this, or any tutorial on this?

Thanks for your help

Related Problems and Solutions