Database

[{"key":1},{"key":2}]

Query

db.collection.update({"someVal":"nonExisting"},[{"$set":{"name":"odsinbfowne"}}],{upsert:true})

Result