common": [
{
"id": 17878,
"name": "sk",
"sort": [
{
"key": "sort_order",
"value": "5"
}
{
"key": "promoId",
"value": "1"
}
]
}
{
"id": 17878,
"name": "sk",
"sort": [
{
"key": "sort_order",
"value": "1"
}
{
"key": "promoId",
"value": "1"
}
]
}
]
type sSortdata struct {
Key string `json:"key"`
Value string `json:"value"`
}
type Data struct {
Id int64 `json:"id"`
Sort []sSortdata `json:"sort"`
}
sort_order type のみを使用して Data struct をソートしたい。sSortdata はグローバル変数ではありません。この簡単な方法をどのように行うことができますか