function addStandardVariants(oResult) {
		var oResultClone = merge({}, oResult);
		each(oResultClone, function(sVariantManagementId, oVariantManagement) {
			var iStandardVariantIndex = oVariantManagement.variants.findIndex(function(oVariant) {
				return oVariant.content.fileName === sVariantManagementId;
			});

			var oStandardVariant;

			if (iStandardVariantIndex === -1) {
				oStandardVariant = createStandardVariant(sVariantManagementId);
			} else {
				oStandardVariant = oVariantManagement.variants[iStandardVariantIndex];
				oVariantManagement.variants.splice(iStandardVariantIndex, 1);
			}

			oVariantManagement.variants.unshift(oStandardVariant);
		});

		return oResultClone;
	}
// add missing standard variants to resultant variant section
add missing standard variants to resultant variant section
add missing standard variants to resultant variant section
function addStandardVariants(oResult) {
		var oResultClone = merge({}, oResult);
		each(oResultClone, function(sVariantManagementId, oVariantManagement) {
			var iStandardVariantIndex = oVariantManagement.variants.findIndex(function(oVariant) {
				return oVariant.content.fileName === sVariantManagementId;
			});
			var oStandardVariant;
			if (iStandardVariantIndex === -1) {
				oStandardVariant = createStandardVariant(sVariantManagementId);
			} else {
				oStandardVariant = oVariantManagement.variants[iStandardVariantIndex];
				oVariantManagement.variants.splice(iStandardVariantIndex, 1);
			}
			oVariantManagement.variants.unshift(oStandardVariant);
		});
		return oResultClone;
	}
function addStandardVariants ( oResult ) { var oResultClone = merge ( { } , oResult ) ; each ( oResultClone , function ( sVariantManagementId , oVariantManagement ) { var iStandardVariantIndex = oVariantManagement . variants . findIndex ( function ( oVariant ) { return oVariant . content . fileName === sVariantManagementId ; } ) ; var oStandardVariant ; if ( iStandardVariantIndex === - 1 ) { oStandardVariant = createStandardVariant ( sVariantManagementId ) ; } else { oStandardVariant = oVariantManagement . variants [ iStandardVariantIndex ] ; oVariantManagement . variants . splice ( iStandardVariantIndex , 1 ) ; } oVariantManagement . variants . unshift ( oStandardVariant ) ; } ) ; return oResultClone ; }
add missing standard variants to resultant variant section
add missing standard variants to resultant variant section