Closed justinling89 closed 5 years ago
i have string teststring := {"fields_desc": {"cpUin": "44444" }} js,_ := simplejson.NewJson([]byte(teststring))
{"fields_desc": {"cpUin": "44444" }}
my question is how can i convert js to string? i use js.string(), but i get "".
ok i have resolve it
js,_ := simplejson.NewJson([]byte(teststring) js.Get("data").Get("10033490").Del("channelname") json,_ := json.Marshal(js) str := string(json) so str is my goal string
i have string teststring :=
{"fields_desc": {"cpUin": "44444" }}
js,_ := simplejson.NewJson([]byte(teststring))my question is how can i convert js to string? i use js.string(), but i get "".