code: public static String findUniqueKey(JSONArray expected) throws JSONException {
          // Find a unique key for the object (id, name, whatever)
          JSONObject o = (JSONObject) expected.get(0); // There's at least one at this point
          for (String candidate : getKeys(o)) {
              if (isUsableAsUniqueKey(candidate, expected)) return candidate;
          }
          // No usable unique key :-(
          return null;
      }
docs: Searches for the unique key of the {@code expected} JSON array.
  
  @param expected the array to find the unique key of
  @return the unique key if there's any, otherwise null
  @throws JSONException JSON parsing error