code: function cleanHorribleOutput(x) {
    if (x && x.$) {
      _.extend(x, x.$);
      delete(x.$);
    }
  
    _.each(x, function(value, prop) {
      if (_.isArray(value) || _.isObject(value)) {
        cleanHorribleOutput(value);
      }
    });
  
    return x;
  }
docs: Ignore me ES: I hate all the stupid xml attribute properties... so I'm flattening.