code: public static String[] getNames(JSONObject jo) {
  
          int length = jo.length();
          if (length == 0) {
              return null;
          }
          Iterator<String> i = jo.keys();
          String[] names = new String[length];
          int j = 0;
          while (i.hasNext()) {
              names[j] = i.next();
              j += 1;
          }
          return names;
      }
docs: Get an array of field names from a JSONObject.<p>
  
  @param jo the JSONObject
  @return an array of field names, or null if there are no names