|
@@ -23,8 +23,8 @@ func FieldFromName(name string) *Field {
|
|
|
func FieldFromIface(val any) *Field {
|
|
|
res := &Field{}
|
|
|
if m, check := json.IsMap(val); check {
|
|
|
- res.Name = strings.TrimSpace(m.String("name", ""))
|
|
|
- if names := m.Slice("fields", nil); len(names) > 0 {
|
|
|
+ res.Name = strings.TrimSpace(m.String("Name", ""))
|
|
|
+ if names := m.Slice("Fields", nil); len(names) > 0 {
|
|
|
res.Names = FieldListFromSlice(names)
|
|
|
}
|
|
|
} else {
|