src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js
function (oEntityContainer, sArrayName, sName, bAsPath) {
			var k,
				vResult = bAsPath ? undefined : null;

			if (oEntityContainer) {
				k = Utils.findIndex(oEntityContainer[sArrayName], sName);
				if (k >= 0) {
					vResult = bAsPath
						? oEntityContainer.$path + "/" + sArrayName + "/" + k
						: oEntityContainer[sArrayName][k];
				}
			}

			return vResult;
		}
function (oEntityContainer, sArrayName, sName, bAsPath) {
			var k,
				vResult = bAsPath ? undefined : null;

			if (oEntityContainer) {
				k = Utils.findIndex(oEntityContainer[sArrayName], sName);
				if (k >= 0) {
					vResult = bAsPath
						? oEntityContainer.$path + "/" + sArrayName + "/" + k
						: oEntityContainer[sArrayName][k];
				}
			}

			return vResult;
		}
function ( oEntityContainer , sArrayName , sName , bAsPath ) { var k , vResult = bAsPath ? undefined : null ; if ( oEntityContainer ) { k = Utils . findIndex ( oEntityContainer [ sArrayName ] , sName ) ; if ( k >= 0 ) { vResult = bAsPath ? oEntityContainer . $path + "/" + sArrayName + "/" + k : oEntityContainer [ sArrayName ] [ k ] ; } } return vResult ; }
Returns the thing with the given simple name from the given entity container.

@param {object} oEntityContainer
the entity container
@param {string} sArrayName
name of array within entity container which will be searched
@param {string} sName
a simple name, e.g. "Foo"
@param {boolean} [bAsPath=false]
determines whether the thing itself is returned or just its path
@returns {object|string}
(the path to) the thing with the given qualified name; <code>undefined</code> (for a
path) or <code>null</code> (for an object) if no such thing is found
Returns the thing with the given simple name from the given entity container .