Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>{ // json object node "SrchResults": [ // jsona array { "FeatCount": "53" }, { // json object node "NAME": "Dengue_Cluster", // string "Number of cases": "10", "HYPERLINK": "http://www.dengue.gov.sg/cms/ehd/20131647.jpg ", "DESCRIPTION": "Ang Mo Kio Ave 3 (Blk 126, 127, 128) / Ang Mo Kio Ave 6 (Blk 124, 125)", "MAPTIP": "Dengue_Cluster", "SYMBOLCOLOR": "#E600A9", "XY": "29342.6037999997,39300.7427999992" }, { "NAME": "Dengue_Cluster", "Number of cases": "11", "HYPERLINK": "http://www.dengue.gov.sg/cms/ehd/20131578.jpg ", "DESCRIPTION": "Guillemard Rd / Lor 28 Geylang / Lor 30 Geylang", "MAPTIP": "Dengue_Cluster", "SYMBOLCOLOR": "#E600A9", "XY": "33644.5215999996,32574.9587999992" } ] } </code></pre> <p>Toparse</p> <pre><code> try { JSONObject jObj = new JSONObject("My Json string"); JSONArray jr = jObj.getJSONArray("SrchResults"); JSONObject json = (JSONObject) jr.get(0); String key = json.getString("FeatCount"); Log.i("...........",key); for(int i=1;i&lt;jr.length();i++) { JSONObject jb= jr.getJSONObject(i); String name = jb.getString("NAME"); String nofcase = jb.getString("Number of cases"); Log.i("Name is....",name); Log.i("No of cases .........",nofcase); } }catch(Exception e) { e.printStackTrace(); } </code></pre> <p>Log</p> <pre><code>12-08 09:53:32.212: I/...........(30147): 53 12-08 09:53:32.212: I/Name is....(30147): Dengue_Cluster 12-08 09:53:32.212: I/No of cases .........(30147): 10 12-08 09:53:32.222: I/Name is....(30147): Dengue_Cluster 12-08 09:53:32.222: I/No of cases .........(30147): 11 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload