How do I update the value of a particular field in the User table for a particular user?
Here’s my code:
Moralis.Cloud.afterSave("EthTransactions", async function(request) {
// From the User table lookup the user with Id equal to "1234".
// For this user, update the value in the "Hobby" column to "Reading".
const query = await new Moralis.Query("User");
query.equalTo("Id", "1234");
const result = await query.first();
result.set("Hobby", "Reading");
await result.save();
});
Currently I get the following error:
TypeError: result.set is not a function