How to serialize a Hashmap for frontend consumption?

I have a Hashmap I need to get to my frontend. I can’t send it directly because Hashmap is not a shared type. I’m considering converting to a list of keys and a list of values. Is there an easier way to do this?

I’ve seen mentions of Blobs but I don’t understand how those work.

1 Like

You’ll want to construct a Record out of the Hashmap if you know what the keys will be ahead of time. If the entries are dynamic, you could consider returning [[key, value]], and paginating the data according to some sorting strategy