fromPairs does not work
Closed this issue · 1 comments
mambla commented
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 {}
antonmedv commented
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 {}