For `Json` - If I have a field like `data Json` ...
# orm-help
a
For
Json
• If I have a field like
data Json
, in the runtime, the data will be something like:
[{},{}]
, should I type this field as
Json[]
then? json can be an array, but what prisma is expecting here? currently,
Json
works perfectly fine though • I constantly getting this error:
Index signature is missing in type BlahBlah
when saving against a
Json
type field, so basically, I need to extends my type with an object type with index, is this recommended ?
r
@Albert Gao 👋 •
Json
can be used instead of
Json[]
as JSON accepts an array as well • I couldn’t quite get this point.