code: function(json) {
        
        var r = function(o) {
            Object.keys(o).forEach(function(v, i) {
  
                if (o[v] !== null && typeof o[v] === 'object' && o[v].hasOwnProperty('$date')) {                
                    o[v] = moment(o[v]['$date']).toDate();
                    return;
                }
                if (o[v] !== null && typeof o[v] === 'object') return r(o[v])
            })
         }
  
         r(json);
  
         return json;
    }
docs: Hack to transform date entries in mongoimport form (ie { $date } into javascript Date object) { $date: "ISODate" } => new Date("ISODate")