package main
import (
"fmt"
"encoding/json"
)
type CobaStruct struct{
Coba *string `json:"cobaDong"`
}
func main() {
values := map[string]string{
"cobaDong": "Platypus",
}
jsonValue, _ := json.Marshal(values)
// var jsonBlob = []byte(`{"cobaDong": "Platypus"}`)
dataRes := &CobaStruct{}
err := json.Unmarshal(jsonValue, dataRes)
if err != nil {
fmt.Println("error:", err)
}
fmt.Printf("Cek =>%v\n", dataRes)
}