From 214feb35f707e534939271a5c8c1236152c6b79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 4 May 2023 18:22:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=9A=84=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filter.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/filter.go b/filter.go index 61d1b0c..1194985 100644 --- a/filter.go +++ b/filter.go @@ -248,6 +248,15 @@ func (f *filter) getValue(dataType string, sourceValue gjson.Result, defaultValu return nil, err } return result, nil + case DataTypeObject: + // object + var ( + result map[string]interface{} + ) + if err := util.JSON.UnmarshalWithNumber([]byte(sourceValueStr), &result); nil != err { + return nil, err + } + return result, nil default: return nil, errors.New(dataType + " is not support!") }