public JSONObject saveObjects(JSONArray inputArray, @Nullable RequestOptions requestOptions) throws AlgoliaException {
    """
	Override the content of several objects.
	
	@param inputArray     contains an array of objects to update (each object must contains an objectID attribute)
	@param requestOptions Request-specific options.
	@throws AlgoliaException
    """
        try {
            JSONArray array = new JSONArray();
            for (int n = 0; n < inputArray.length(); n++) {
                JSONObject obj = inputArray.getJSONObject(n);
                JSONObject action = new JSONObject();
                action.put("action", "updateObject");
                action.put("objectID", obj.getString("objectID"));
                action.put("body", obj);
                array.put(action);
            }
            return batch(array, requestOptions);
        } catch (JSONException e) {
            throw new AlgoliaException(e.getMessage());
        }
    }
public JSONObject saveObjects(JSONArray inputArray, @Nullable RequestOptions requestOptions) throws AlgoliaException {
        try {
            JSONArray array = new JSONArray();
            for (int n = 0; n < inputArray.length(); n++) {
                JSONObject obj = inputArray.getJSONObject(n);
                JSONObject action = new JSONObject();
                action.put("action", "updateObject");
                action.put("objectID", obj.getString("objectID"));
                action.put("body", obj);
                array.put(action);
            }
            return batch(array, requestOptions);
        } catch (JSONException e) {
            throw new AlgoliaException(e.getMessage());
        }
    }
public JSONObject saveObjects ( JSONArray inputArray , @ Nullable RequestOptions requestOptions ) throws AlgoliaException { try { JSONArray array = new JSONArray ( ) ; for ( int n = 0 ; n < inputArray . length ( ) ; n ++ ) { JSONObject obj = inputArray . getJSONObject ( n ) ; JSONObject action = new JSONObject ( ) ; action . put ( "action" , "updateObject" ) ; action . put ( "objectID" , obj . getString ( "objectID" ) ) ; action . put ( "body" , obj ) ; array . put ( action ) ; } return batch ( array , requestOptions ) ; } catch ( JSONException e ) { throw new AlgoliaException ( e . getMessage ( ) ) ; } }
Override the content of several objects.

@param inputArray     contains an array of objects to update (each object must contains an objectID attribute)
@param requestOptions Request-specific options.
@throws AlgoliaException
Override the content of several objects .