-
When I comment the Is there a way around this without redefining everything from mytype? I cannot change the underlying code (which has a
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This one is a bit tricky... Properties in ECMAScript can only be strings or Symbols, so the key must be converted into string before used as a property name, and if a value is a If you can change the javascript code, you can work around that by doing |
Beta Was this translation helpful? Give feedback.
This one is a bit tricky... Properties in ECMAScript can only be strings or Symbols, so the key must be converted into string before used as a property name, and if a value is a
fmt.Stringer
then theString()
method is used for that.If you can change the javascript code, you can work around that by doing
d.Items[Number(key)] = "bar"
.