У меня есть ответ json с динамическими клавишами, и у меня возникли некоторые трудности с его отменой. Может ли кто-нибудь помочь со структурами?
{
"accountDetails": {
"123": {
"userDetails": {
"login": 123
}
},
"456": {
"userDetails": {
"login": 456
}
}
}
}
В настоящее время мои структуры:
type Response struct {
AccountDetails AccountDetails `json:"accountDetails"`
}
type AccountDetails struct {
Accounts map[string]UserDetails
}
type UserDetails struct {
Account Account `json:"userDetails"`
}
type Account struct {
Login int `json:"login"`
}