summaryrefslogtreecommitdiff
path: root/src/pkg/json/struct.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/struct.go')
-rw-r--r--src/pkg/json/struct.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/json/struct.go b/src/pkg/json/struct.go
index ee23d1e9d..b6cebe12d 100644
--- a/src/pkg/json/struct.go
+++ b/src/pkg/json/struct.go
@@ -185,7 +185,7 @@ func (b *_StructBuilder) Key(k string) Builder {
if v, ok := reflect.Indirect(b.val).(*reflect.StructValue); ok {
t := v.Type().(*reflect.StructType);
if field, ok := t.FieldByName(k); ok {
- return &_StructBuilder{ v.Field(field.Index) }
+ return &_StructBuilder{ v.FieldByIndex(field.Index) }
}
// Again, case-insensitive.
for i := 0; i < t.NumField(); i++ {