When creating a Mongo Collection, I mistakenly set one of the fields equal to a string array. I now need to go back and change all of these arrays into simple strings. I had tried to first delete the field containing the string array using the below:
db.messages.update(
{},
{
'$unset': {"userResponse":1}
},
{'multi': true}
)
But this only set the field equal to an empty array (not deleting the field completely as hoped). Any suggestions?