I have simple collection like this:
db.people.insert(
[
{
name:"John",
sex:"M"
},
{
name:"Susanne",
sex:"W"
},
{
name:"Kate",
sex:"W"
}
])
On the basis of sex field I would like to create other field Sex2:
case
when sex:"M" then sex2:"Man"
when sex:"W" then sex2:"Women"
any tips how I can manage it with .update function?