I have the following code for calling an API that returns JSON with the following format:-
{
"data": [
{
" Ser": 1,
" No": 1
},
{
" Ser": 2,
" No": 2
},
{
" Ser": 3,
" No": 3
},
{
" Ser": 4,
" No": 4
},
{
" Ser": 5,
" No": 5
},
]
}
The code is:-
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("/json/api/getinfo?type=100");
HttpResponse response = client.execute(request);
// Get the response, how i can loop through the returned JSON and assign the reterned json to a global parameters which i can access from ym system using has values #parameter1# , #parameter2#, etc.
so how can I loop through the returned JSON and assign it 'NO' to the global parameters? Best Regards