code: protected boolean hasKey(final String key, final JSONObject jsonObject) {
      return jsonObject != null
             && jsonObject.has(key);
    }
docs: Does the JSONObject have a specified key?
  
  @param key key to check
  @param jsonObject object to check
  
  @return true if the key exists