Using loopback I need to get the modelName from a model instance. Any Ideas?
var myAccount = new app.models.Account({name: 'ACME'});
var modelName = myAccount.modelName;`
//should get 'Account'
I managed to retrieve the model name by using (where this is the model):
this.definition.name;