Add a new list item to a Key value database

81 views Asked by At

I'm working on a game, and for each user, I have a list called PlaySessions which stores all data related to a certain play session. For example:

{"PlaySessions":[{"playsession Date":"12-12-2014","playsession points":"120"},
{"playsession Date":"14-12-2014","playsession points":"200"}]
}

I want to add a new play session to this list, so it becomes:

{"PlaySessions":[{"playsession Date":"12-12-2014","playsession points":"120"},
{"playsession Date":"14-12-2014","playsession points":"200"},
{"playsession Date":"15-12-2014","playsession points":"300"}]
}

Will I have to download the entire list, add the element manually on my client game and then resend the list so it overwrites the old one? If there is another, cleaner way of doing this then thank you for helping.

0

There are 0 answers