docs: function moveArray(object, sourceKey, destinationKey, useSameObject) {
      var embeddedObject = object[sourceKey];
      if (embeddedObject) {
          var processedData = {};
          processedData[destinationKey] = {};
  
          if (useSameObject === true) {
              // loop over all items in the embedded object and add them to the processed data
              angular.forEach(Object.keys(embeddedObject), function (key) {
                  processedData[destinationKey][key] = embeddedObject[key];
              });
          } else {
              // remove the key and replace it with the value of it
              var key = Object.keys(embeddedObject)[0];
              processedData[destinationKey] = embeddedObject[key];
          }
  
          object = angular.extend(object, processedData);
          delete object[sourceKey];
      }
      return object;
  }