Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.getCollection('offers').find({}).forEach(function(item, index){
- print(item);
- // item.employerId
- if (!item.dateOfPost) {
- db.getCollection('offers').update(
- { _id: item._id },
- {
- $set: {
- dateOfPost: new Date(),
- }
- }
- )
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement