Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this way:</p> <pre><code>JSONObject outerObject = new JSONObject(json); JSONObject innerObject = outerObject.getJSONObject("highlighting"); for(Object key : innerObject.keySet()) { JSONObject o =innerObject.getJSONObject(key.toString()); String[] elementNames = JSONObject.getNames(o); System.out.printf("%s &gt;&gt; %d ELEMENT(S) IN CURRENT OBJECT:\n", key, elementNames.length); for (String elementName : elementNames) { System.out.println(elementName); String value = o.get(elementName).toString(); System.out.printf("name=%s, value=%s\n", elementName, value); } System.out.println(); } </code></pre> <p><strong>SAMPLE OUTPUT</strong></p> <pre> http://www.hellodesign.com/ >> 3 ELEMENT(S) IN CURRENT OBJECT: relatedLinks name=relatedLinks, value=["=&quot;mailto:hello@hellodesign.com&quot; title=&quot;hello@hellodesign.com&quot;&gt;hello@hellodesign.com&lt;/a&gt;"] title name=title, value=["Hello"] fulltxt name=fulltxt, value=["Hello You need the Latest Flash Player to view this site. Click here to download Flash Click here if you know you have Flash Address 10305 Jefferson Blvd. Culver City, CA 90232 Telephone 310-839-4885"," Fax 310-839-4886 Email New Business newbusiness@hellodesign.com Press Inquiries press@hellodesign.com Career Inquiries careers@hellodesign.com General Inquiries hello@hellodesign.com"] ... </pre> <p><code>highlighting</code> is not a child of <code>responseHeader</code>, so I get right from the read json. Later I use the <code>keySet()</code> method to get the urls inside <code>highlighting</code>.</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. 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