Change REST service to return an object for single result or an array of objects and a meta object form multiple results