I\'m trying to extract the keys from a JSON Object. The JSON object, in this case, is obtained by making an API call to a social networking site called SkyRock and
This works for me
o is a JSONObject -> import org.json.simple.JSONObject;
Set> s = o.keySet(); Iterator> i = s.iterator(); do{ String k = i.next().toString(); System.out.println(k); }while(i.hasNext());