Closed mambla closed 2 months ago
fromPairs() works!
This is a restriction of the playground. As it tries to marshal output to JSON to display it and fails.
In Go, json package can marshal map[string]any
to string. But fromPairs() returns map[any]any
, and we get next message:
json: unsupported type: map[interface {}]interface {}
When trying the example from the site in the playground: fromPairs([["name", "John"], ["age", 30]])
We receive the error json: unsupported type: map[interface {}]interface {}