I've been having trouble with the problem of removing a string from an array in a mongodb document. For example I want to remove the entry "four" from the list field in the document below.
{
"list" : [ "1", "2", "four", "five", "6"]
}
I know it seems very simple but I haven't been able to find a straight answer from the docs or previous questions. I've tried 5 or so commands to no avail using db.collection.update combined with the $pull and $mod modifiers. Any help?
I know, very rudimentary question.