go append to an interface key/field which is a map
<p>My question is about appending to a map which is a filed/key of an interface. This is required to build a JSON object. I am using <code>map[string]interface{}</code> to be able to append any struct types to it. I am not sure if that is a right way as I am still learning Go but I could not find a better way. Below is a link to a playground:<br>
<a href="https://play.golang.org/p/cxpSep8OQD" rel="nofollow noreferrer">https://play.golang.org/p/cxpSep8OQD</a>.</p>

<p>I think I need to use type accretion but I do not understand how. Any help would be useful. </p>