src/sap.ui.core/src/sap/ui/core/util/MockServer.js
function(data, select, currentPath) {
						var result = {};
						// traversed path to get to data:
						currentPath = currentPath || '';
						if (typeof data !== 'object') {
							return data;
						}
						if (typeof data.slice === 'function') {
							return data.map(function(el, index) {
								return fnMultiSelect(el, select, currentPath); // on same path
							});
						}
						// If Object:
						// Handle "__metadata" property
						if (data.__metadata !== undefined && currentPath.length === 0) {
							result.__metadata = data.__metadata;
						}
						// Take the relevant paths only.
						select.filter(function(path) {
							return (path + '/').indexOf(currentPath) === 0;
						}).forEach(function(path, _, innerSelect) {
							// then get the next property in given path
							var propertyKey = path.substr(currentPath.length).split('/')[0];
							// Check if we have that propertyKey on the current object
							if (data[propertyKey] !== undefined) {
								// in this case recurse again while adding this to the current path
								result[propertyKey] = fnMultiSelect(data[propertyKey], innerSelect, currentPath + propertyKey + '/');
							}
						});
						// Add specific results case handling
						if (data.results !== undefined) { // recurse with same path
							result.results = fnMultiSelect(data.results, select, currentPath);
						}
						return result;
					}
function(data, select, currentPath) {
						var result = {};
						// traversed path to get to data:
						currentPath = currentPath || '';
						if (typeof data !== 'object') {
							return data;
						}
						if (typeof data.slice === 'function') {
							return data.map(function(el, index) {
								return fnMultiSelect(el, select, currentPath); // on same path
							});
						}
						// If Object:
						// Handle "__metadata" property
						if (data.__metadata !== undefined && currentPath.length === 0) {
							result.__metadata = data.__metadata;
						}
						// Take the relevant paths only.
						select.filter(function(path) {
							return (path + '/').indexOf(currentPath) === 0;
						}).forEach(function(path, _, innerSelect) {
							// then get the next property in given path
							var propertyKey = path.substr(currentPath.length).split('/')[0];
							// Check if we have that propertyKey on the current object
							if (data[propertyKey] !== undefined) {
								// in this case recurse again while adding this to the current path
								result[propertyKey] = fnMultiSelect(data[propertyKey], innerSelect, currentPath + propertyKey + '/');
							}
						});
						// Add specific results case handling
						if (data.results !== undefined) { // recurse with same path
							result.results = fnMultiSelect(data.results, select, currentPath);
						}
						return result;
					}
function ( data , select , currentPath ) { var result = { } ; // traversed path to get to data: currentPath = currentPath || '' ; if ( typeof data !== 'object' ) { return data ; } if ( typeof data . slice === 'function' ) { return data . map ( function ( el , index ) { return fnMultiSelect ( el , select , currentPath ) ; // on same path } ) ; } // If Object: // Handle "__metadata" property if ( data . __metadata !== undefined && currentPath . length === 0 ) { result . __metadata = data . __metadata ; } // Take the relevant paths only. select . filter ( function ( path ) { return ( path + '/' ) . indexOf ( currentPath ) === 0 ; } ) . forEach ( function ( path , _ , innerSelect ) { // then get the next property in given path var propertyKey = path . substr ( currentPath . length ) . split ( '/' ) [ 0 ] ; // Check if we have that propertyKey on the current object if ( data [ propertyKey ] !== undefined ) { // in this case recurse again while adding this to the current path result [ propertyKey ] = fnMultiSelect ( data [ propertyKey ] , innerSelect , currentPath + propertyKey + '/' ) ; } } ) ; // Add specific results case handling if ( data . results !== undefined ) { // recurse with same path result . results = fnMultiSelect ( data . results , select , currentPath ) ; } return result ; }
Add Support for multiple select return 1...n
Add Support for multiple select return 1 ... n