Parsing json value into text line by line

Hey I want to output this value in the following format.

Can anyone help please?


is not clear to me if you’re asking hot to print the list of strings returned by the API call or how to get the list calling the URL.

var values []string

if err := json.Unmarshal([]byte(response), &values); err != nil {
	panic("something bad happened")

for _, item := range values {

assuming response contains the JSON string returned by the API call, this code prints the strings one per line

1 Like

Hey that help me a lot. I got it now.

Thank you for your help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.