I need to convert fields like this:
{
\"_id\" : ObjectId(\"576fd6e87d33ed2f37a6d526\"),
\"phoneme\" : \"JH OY1 N Z\"
}
into an a
In any halfway modern JavaScript engine, it is
var myString = 'foo bar baz';
var myArray = myString.split(' ');
which should work even on the shell.
Internally, since MongoDB 2.4 Google's V8 engine is used, which conforms ECMA-262. Expect all functionality defined in this standard at least.
I haven't checked it, but some objects you know from the browser really don't make much sense in the mongo shell. All DOM related, that is. So before using them, I'd rather check wether they exist right away.