datascript
datascript copied to clipboard
Does it possible to export/dump all db data as JSON?
Yes
Sorry I forgot about that issue. Yes it’s totally possible. Consider
(js/JSON.stringify
(into-array
(for [d (d/datoms db :eavt)]
#js [(:e d) (name (:a d)) (:v d)])))
Is this possible through the JS API? I see the datoms() function is exposed, but I'm still getting a function returned from that rather than data... it'd be great if I could just get an array of arrays ([[e, a, v, t, a-r], ...]).