How to actually define ObjectID when using .saveObjects?

In the docs, there is no example to explicitly define ObjectID. I do want to use autoGenerateObjectIDIfNotExist as it duplicate my objects in the index. Nor do I want to use replaceAllObjects as creates more and more Indices each time.

I am using useEffect to pull the API from MongoDB. How would I define ObjectID? Through a for loop?

For reference this is for a MERN app.


useEffect(() => {

    const config = {

      headers: {

        Authorization: `Bearer ${userInfo.token}`,

      },

    };

    const fetchPasswords = async () => {

      const { data } = await axios.get("/api/passwords", config);

      setPasswords(data);

    };

    fetchPasswords();

  }, []);
index

    .saveObjects(passwords, {

      objectIDs: passwords._id,

    })

    .then(({ objectIDs }) => {

      console.log(objectIDs);

    });