Hi Jeff,
Apologies for the delayed response. What'll you need to do here is get the matchdata object with getMatchData(). Then make all of the required changes and set the object back with setMatchData(yourObject). If you need more control you could create a collection and use the matchId as an id for the document and store all of your match information there. You could then query and update it using mongo.
Regards,
Liam
Jeff Van Laethem
I've found very little about the functionality of matchData. What I'm trying to do is store a couple small pieces of data in matchData. From reading this Q&A post I've figured out much of what I need, but I'm stumped on this:
Here's my desired data:
So two keys at the root level ("seats", which itself can contain many nodes within it, and "dealer", which is a single).
Through cloudcode I'm using the MatchFoundMessage to check the matchdata for "dealer", and if it doesn't exist, it adds it with a random participant of the match. That much works.
I have an Event-bound script that adds "seats" nodes to the MatchData. The first time it's called, it replaces everything in MatchData with the new seat entry. Subsequent seat entries get added to the "Seats" collection just fine. Borrowing heavily from the previous link, my Event script looks like this:
and pushing "seats" to baseNode, then setting MatchData, but I got an error stating that push isn't a function for baseNode.