I need to pass something that is not a primitive to the data type.
I am constructing something like this to send to the create method:
const p2 = {
The type you provide in the model are the types defined in the database you use. If you are using postgresql, you can use DataTypes.JSON as the type.
type
postgresql
DataTypes.JSON
If not, to save object, you can JSON.stringify the object and pass it as a string.
JSON.stringify