fmt.Println, won’t be showing “,” between each element of array if you want to print it that way you need to format and print it
var datas [][]string
json.Unmarshal(reqBody, &datas)
fmt.Println("this is after the unmarshalling")
array := []string{}
for _, data := range datas {
array = append(array, fmt.Sprintf("[%s]", strings.Join(data, ",")))
}
output := fmt.Sprintf("[%s]", strings.Join(array, ","))
fmt.Println(output)
2
solved Getting an array of arrays from a POST operation into a GO calculation through reqBody and json unmarshal [closed]