function _fnFindBestMatch(aValues, sBindingPath) {
		var iJsonModelMin = -1;
		var sJsonModelBestMatch = false;
		aValues.forEach(function(sKey) {
			var iCurrDest = StringAnalyzer.calculateLevenshteinDistance(sBindingPath, sKey);
			if (iJsonModelMin === -1 || iCurrDest < iJsonModelMin) {
				iJsonModelMin = iCurrDest;
				sJsonModelBestMatch = sKey;
			}
		});
		return sJsonModelBestMatch;
	}
function _fnFindBestMatch(aValues, sBindingPath) {
		var iJsonModelMin = -1;
		var sJsonModelBestMatch = false;
		aValues.forEach(function(sKey) {
			var iCurrDest = StringAnalyzer.calculateLevenshteinDistance(sBindingPath, sKey);
			if (iJsonModelMin === -1 || iCurrDest < iJsonModelMin) {
				iJsonModelMin = iCurrDest;
				sJsonModelBestMatch = sKey;
			}
		});
		return sJsonModelBestMatch;
	}
function _fnFindBestMatch ( aValues , sBindingPath ) { var iJsonModelMin = - 1 ; var sJsonModelBestMatch = false ; aValues . forEach ( function ( sKey ) { var iCurrDest = StringAnalyzer . calculateLevenshteinDistance ( sBindingPath , sKey ) ; if ( iJsonModelMin === - 1 || iCurrDest < iJsonModelMin ) { iJsonModelMin = iCurrDest ; sJsonModelBestMatch = sKey ; } } ) ; return sJsonModelBestMatch ; }
Control, Internal, Application
Control Internal Application
Find the best value in the given array of values