I want to get values from bid
.
I've already tried data.(map[string]interface{})
but It did not work.
when I tried, It says:
"interface conversion: interface {} is []interface {}, not map[string]interface {}"
Please help me...
This is my code.
url := "https://api.binance.com/api/v1/depth?symbol=RENBTC"
a, _ := http.Get(url)
e, _ := ioutil.ReadAll(a.Body)
var data map[string]interface{}
_ = json.Unmarshal([]byte(e), &data)
bid := data["bids"]
fmt.Println(bid[0])