code: function objectToArray(object) {
      var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';
  
      var convertedArray = [];
  
      Object.keys(object).forEach(function (_key) {
        var item = object[_key];
        item[key] = _key;
        convertedArray.push(item);
      });
  
      return convertedArray;
    }
docs: converts an object to an array