Mongo Playground

Configuration

[{"data":[["a","b"],["c","d"]]}]

Query

db.collection.update({},[{"$set":{"data":{"$map":{"input":"$data","as":"item","in":{"$map":{"input":"$$item","as":"childItem","in":{"$cond":{"if":{"$eq":["$$childItem","a"]},"then":"e","else":"$$childItem"}}}}}}}}])

Result