everybody, could you please tell me
I use the objection.js (ORM) library for knex.js
joined Users and Roles tables, everything is great.
I use it:
const users = await User.query().eager().roles')
I'm getting it:
{"id":1, "email": "ann@mail.com", "password": "qwe", "role":1, "roles":{"id":1, "name": "admin"}}
But how can I get a flat structure? :
{"id":1, "email": "ann@mail.com", "password": "qwe", "role "admin"}