Updating an Object through its objectId

Lets say I create a new object and I save it:

const GameScore = Moralis.Object.extend("GameScore");
const gameScore = new GameScore();
gameScore.set("score", 1337);

Then if I refresh the page I can query the same object through its objectId, but what if I want to continue saving on the same object?

So far I tryied something like:

const gameScore = GameScore(objectId);

but its not working…

You can use the same “gameScore” object, do another .set and .save

1 Like

Hi, in my code is not working, every time I try to update an entry it creates a new obj in moralis. Any clues? Why for users object there is setUserData and there isn’t something similar for classes? Thanks

create a new thread and post full code
Please format code.

Closing this thread :raised_hands: