E
E
Evdokim2019-12-22 11:44:28
JSON
Evdokim, 2019-12-22 11:44:28

How to do this in a findAll query in Sequelize?

When I specify the Parameter model in the include parameter in the findAll request in Sequelize , then all its fields are displayed in the JSON response, as in the picture:
5dff2be4d43bf722050929.png
The picture shows that there is a parameter field that contains id, name, title, etc. Everything is correct.
How to make the value from the title, and not the object, be immediately substituted in the parameter field? To be: The remaining fields are not needed and do not want excessive nesting. What should be added to the findAll query? Or do you need to adjust something in the models themselves?
"parameter": "Модель"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question