I have imported a csv file containing Programme data into a MongoDB collection. One of the fields, tags, is empty for some of the documents. Example:
"_id" : ObjectId("5906252136ac939ea93b4110"),
"pid" : "b00mtw7l",
"epoch_start" : ISODate("2009-02-05T08:16:00Z"),
"epoch_end" : ISODate("2009-02-12T08:16:00Z"),
"complete_title" : [
"big and small",
" series 1",
" theres space for small"
],
"media_type" : "video",
"tags" : [""] //empty field, how to delete?
I want to delete the the empty tag fields entirely to reduce the redundancy of the data. How do I do this through the mongo shell rather than altering the csv file before importing it?
Thanks.