DEV Community

Discussion on: Best way to store array type data inside database?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I have seen it stored like this (which is actually Anki)

'\x1f' + [ ...(string[]) ].join('\x1f') + '\x1f'

But if I had to do it more complex, like more fields, and rename-able, I would definitely do it the 2st way.

I wouldn't rely on JSON Object, if I can avoid.