controllers/Group.js
function(req, res, next){

		// Search for ID if requested
		var id = req.param('id');

		findAssociated(id, finishRendering);

		// Render JSON content
		function finishRendering(data){
			// If none object found with given id return error
			if(id && !data[0])
				return next();

			// If querying for id, then returns only the object
			if(id)
				data = data[0];

			// Render the json
			res.send(data);
		}
	}
function(req, res, next){

		// Search for ID if requested
		var id = req.param('id');

		findAssociated(id, finishRendering);

		// Render JSON content
		function finishRendering(data){
			// If none object found with given id return error
			if(id && !data[0])
				return next();

			// If querying for id, then returns only the object
			if(id)
				data = data[0];

			// Render the json
			res.send(data);
		}
	}
function ( req , res , next ) { // Search for ID if requested var id = req . param ( 'id' ) ; findAssociated ( id , finishRendering ) ; // Render JSON content function finishRendering ( data ) { // If none object found with given id return error if ( id && ! data [ 0 ] ) return next ( ) ; // If querying for id, then returns only the object if ( id ) data = data [ 0 ] ; // Render the json res . send ( data ) ; } }
Mix in matches inside groups data
Mix in matches inside groups data