Unfortunately I don\'t have a record I can test this on, but I can\'t find any information on this anywhere.
Say I have a document like this:
{ email:
You need to provide the full path the modified object field, so it should be:
doc.markModified('email.data');