gjson
gjson copied to clipboard
How to convert []Result to json string ?
How to convert []Result to json string ?
.String()
is the array has .String() method ? @wMw9
Pretty basic stuff but I'll play along.
// Assuming targeting list
var myResults gjson.Result
for _, r := range myResults.Array() {
myString := r.String()
fmt.Println(myString)
}
You may need to read up on the result type methods, they will guide you...