How to send a HashMap from Rust side to Javascript as Map instead of Object? #9153
-
I noticed if a Rust command returns a HashMap<K, V>, it is received in Javascript as Object. Is there a way to change it to Javascript Map<K, V> instead? What code controls the transformation? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Mar 12, 2024
Replies: 1 comment 1 reply
-
Did some search and my findings are:
It seems we have to manually create a new Map from the object in the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yep