Showing Json field (mysql) in API (decode or formated) #3783
Answered
by
EwertonDutra
EwertonDutra
asked this question in
Help
-
Beta Was this translation helpful? Give feedback.
Answered by
EwertonDutra
Jul 4, 2022
Replies: 1 comment
-
For now I used an option that I was satisfied @column({
// prepare: (value) => JSON.stringify(value),
consume: (value) => JSON.parse(value),
})
public atributos: object | null; The prepare is commented because I didn't have to do anything to save it correctly, but I left it commented so I can remember that it has the option too 😜 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thetutlage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For now I used an option that I was satisfied
The prepare is commented because I didn't have to do anything to save it correctly, but I left it commented so I can remember that it has the option too 😜