Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package main
import (
func main() {
b := []byte(`{"key":"value"}`)
var f interface{}
json.Unmarshal(b, &f)
myMap := f.(map[string]interface{})
Copy link

brunotrajano-mm commented Dec 21, 2021

Thanks! It helped a lot

Copy link

ashmilhussain commented Feb 10, 2022

how to do this for a nested data

b := []byte({"key":{"key1":"value"}})

Copy link

vmpastran commented Feb 17, 2022

Merci beaucoup

Copy link

sramac2 commented Feb 17, 2022


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment