extend existing API with custom endpoints

I’m creating an API for multiple customers. The core endpoints like /users are used by every customer but some endpoints rely on individual customization. So it might be that User A wants a special endpoint /groups and no other customer will have that feature. Just as a sidenote, each customer would also use his own database schema because of those extra features. I personally use NestJs (Express under the hood). So the app.module currently registers all my core modules (with their own endpoints etc.) I think this problem is not related to NestJs so how would you handle that in

cannot access objects inside service response

When I tried to access the JSON response I cannot access the object. I need to get the target and datapoint objects and after that I need to iterate the dataPoint array. result.target is undefined …