src/sap.m/src/sap/m/ViewSettingsDialog.js
function getViewSettingsItemByKey(aViewSettingsItems, sKey) {
		var i, oItem;

		// convenience, also allow strings
		// find item with this key
		for (i = 0; i < aViewSettingsItems.length; i++) {
			if (aViewSettingsItems[i].getKey() === sKey) {
				oItem = aViewSettingsItems[i];
				break;
			}
		}

		return oItem;
	}
function getViewSettingsItemByKey(aViewSettingsItems, sKey) {
		var i, oItem;

		// convenience, also allow strings
		// find item with this key
		for (i = 0; i < aViewSettingsItems.length; i++) {
			if (aViewSettingsItems[i].getKey() === sKey) {
				oItem = aViewSettingsItems[i];
				break;
			}
		}

		return oItem;
	}
function getViewSettingsItemByKey ( aViewSettingsItems , sKey ) { var i , oItem ; // convenience, also allow strings // find item with this key for ( i = 0 ; i < aViewSettingsItems . length ; i ++ ) { if ( aViewSettingsItems [ i ] . getKey ( ) === sKey ) { oItem = aViewSettingsItems [ i ] ; break ; } } return oItem ; }
Gets an sap.m.ViewSettingsItem from a list of items by a given key.

@param {array} aViewSettingsItems The list of sap.m.ViewSettingsItem objects to be searched
@param {string} sKey The key of the searched item
@returns {*} The sap.m.ViewSettingsItem found in the list of items
@private
Gets an sap . m . ViewSettingsItem from a list of items by a given key .