{
"meta": {
"type": "RESPONSE",
"application": "",
"data0": {
some data
},
"lv1": [
{
"status": "SUCCESS",
"response-type": "JSON",
"message": {},
"response": {
"more_data": "TRUE",
"no_result": "5",
"current_page": "1",
"data": [[
"1",
"2",
"3"]]
}
}
]
}
}
type response struct {
META struct {
LV []struct {
RESPONSE struct {
Data []struct {
array []struct {
val []string
}
} `json:"data"`
} `json:"response"`
} `json:"lv1"`
} `json:"meta"`
}
How can I get the values in the following?
"data": [[
"1",
"2",
"3"]]
I've tried both interface and struct. Using interface results in [1 2 3]
of interface type and I'm not sure how I can get the values. When using struct, I ran into problem when trying to map an array of array with error message:
"cannot unmarshal array into Go struct field .data of type struct { vals []string }"