]> 127.0.0.1 Git - part/.git/commitdiff
65
authorqydysky <qydysky@foxmail.com>
Tue, 22 Sep 2020 04:20:07 +0000 (12:20 +0800)
committerqydysky <qydysky@foxmail.com>
Tue, 22 Sep 2020 04:20:07 +0000 (12:20 +0800)
Json.go

diff --git a/Json.go b/Json.go
index f746a0deeb88fb42e8e787279297d5ba333b1a2d..207d387b2f1b0293f1a9240b2117f52f93c20e04 100644 (file)
--- a/Json.go
+++ b/Json.go
@@ -56,13 +56,13 @@ func (*json) GetValFrom(Source interface{},key string)interface {}{
        default:
         jq = gojsonq.New().FromInterface(Source)
     }
-       return jq.Find(key)
+       return jq.More().Find(key)
 }
 
 func (*json) GetValFromS(Source string,key string)interface {}{
        var jq *gojsonq.JSONQ
        jq = gojsonq.New().FromString(Source)
-       return jq.Find(key)
+       return jq.More().Find(key)
 }
 
 func (this *json) GetMultiValFrom(Source interface{},key []string) []interface{}{
@@ -81,7 +81,7 @@ func (this *json) GetMultiValFrom(Source interface{},key []string) []interface{}
        var returnVal []interface{}
        for _,i := range key {
                jq.Reset()
-               returnVal = append(returnVal,jq.Find(i))
+               returnVal = append(returnVal,jq.More().Find(i))
        }
 
        return returnVal