I have sizable Go WASM application that creates map[string]interface{} and passes to JS or reads from JS library.
Go maps do not have predefined key order. But JS has object property order predictable in JavaScript objects since ES2015.
Problem: when JS objects are transferred from JS into Go and back they key order becomes scrambled.
At this point I have a small fix inside JS application that simply reorders keys coming from Go back into JS.
A bit of a hack but works.
Question: is there better solution?
My environment:
1. Go 1.13.
2. Chrome and Edge browsers.
3. Windows 10 desktop 64bits.