I need to convert fields like this:
{ \"_id\" : ObjectId(\"576fd6e87d33ed2f37a6d526\"), \"phoneme\" : \"JH OY1 N Z\" }
into an a
This should work with Mongo 3.4+ (see here for more info). This is a bit more concise than user3100115's answer.
db.members.aggregate( [ { "$addFields": { "phonemes": { "$split": [ "$phoneme", " " ] } }}, { "$out": "members" } ] )