修复拼写错误

This commit is contained in:
2021-04-13 22:14:32 +08:00
parent 2fd996aa4c
commit d98822a5ee
2 changed files with 5 additions and 4 deletions

View File

@ -55,13 +55,13 @@ func (pjt *ParseJSONTree) Parse(pathList []string) (*DynamicJSON, error) {
pathArr := strings.Split(path, "[]")
for idx, item := range pathArr {
val := gjson.Get(source, item)
isComplextType := val.IsArray()
isComplexType := val.IsArray()
if len(pathArr)-1 == idx {
// 当前是最后一项,说明不是数组
if isComplextType {
if isComplexType {
fmt.Println("这是一个数组")
}
result.SetValue(item, val.Raw, isComplextType)
result.SetValue(item, val.Raw, isComplexType)
continue
}
}