I am trying to process some data stored in MongoDB. These are integers packed in a byte string. Something of the form:
"touch_data" : "\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
If I take this string and compute its length, mongo's js engine tells me its 0 instead of 7. I confirmed this by setting different values for touch data and computed its length:
hello => 5 he\0llo => 2
Any ideas on how I can read the 'complete' string?