db.schemas.find({name:"project_customers_5af11aed7836e53262f5572c.json"}).forEach(function(x) {
var json = JSON.parse(x.schema);
if(json.properties && json.properties.promoter_3) {
delete json.properties.promoter_3.$ref;
delete json.definition;
db.schemas.update({_id:x._id},{$set:{schema:JSON.stringify(json)}},false,true);
}
});
网友评论