objectToQuery