sunny-green
sunny-green•2y ago

Json Array of strings

Hi, is possible to save data into json array of strings, instead of array of objects with one property? Now I have this format
[{"name": "Filip"}, {"name": "Denis"}, ...]
[{"name": "Filip"}, {"name": "Denis"}, ...]
and I need this format
["Filip", "Denis", ...]
["Filip", "Denis", ...]
3 Replies
Alexey Udovydchenko
Alexey Udovydchenko•2y ago
MDN Web Docs
Object.values() - JavaScript | MDN
The Object.values() static method returns an array of a given object's own enumerable string-keyed property values.
!!!Joefree!!! 👑
you could use key-value storage to save simple plain text array
Lukas Krivka
Lukas Krivka•2y ago
Dataset doesn't allow plain strings, it must be object. So you would need KV store

Did you find this page helpful?