Access the values ​​of a query


I want to access the values ​​that a query throws at me, but it throws to me that toJson is not recognized when I work I do the query with database, in advance thank you very much

const usuarios = await Database

const usuariosJSON = usuarios.toJSON()


toJSON is a method that exists on models and not raw query builder.

The output of query builder is a plain Array, so just use it as it is