Skip to content

Instantly share code, notes, and snippets.

@jketcham
Last active November 22, 2016 18:21
Show Gist options
  • Save jketcham/f57c94a3aa68d40fa7236d18f332ba65 to your computer and use it in GitHub Desktop.
Save jketcham/f57c94a3aa68d40fa7236d18f332ba65 to your computer and use it in GitHub Desktop.

Revisions

  1. jketcham renamed this gist Nov 22, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt → update.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    db.talentfeed_meta.find({}).snapshot().forEach(function(item) {
    db.collection.find({}).snapshot().forEach(function(item) {
    for (i = 0; i < item.array.length; i++) {
    item.array[i].newProp = item.array[i].oldProp;
    delete item.array[i].oldProp;
    }
    db.talentfeed_meta.update({
    db.collection.update({
    _id: item._id
    }, item);
    })
  2. jketcham created this gist Nov 22, 2016.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    db.talentfeed_meta.find({}).snapshot().forEach(function(item) {
    for (i = 0; i < item.array.length; i++) {
    item.array[i].newProp = item.array[i].oldProp;
    delete item.array[i].oldProp;
    }
    db.talentfeed_meta.update({
    _id: item._id
    }, item);
    })