完成数据过主干逻辑,细节健壮性有待继续完善 #4

Merged
zhangdeman merged 13 commits from feature/data_filter into master 2023-09-02 22:17:14 +08:00
Showing only changes of commit 81f9c552dd - Show all commits

View File

@ -78,7 +78,7 @@ func (df *DataFilter) Filter() (string, error) {
// 数据源路径不识数组, 多个key写入到同一个map key, 并且map key 不是以[]结尾, 自动格式化
// 目标位置, 是一个数组
if df.pathIsArrayValue(item.MapKey) {
realMapKey := strings.Trim(item.MapKey, ".[]")
realMapKey := strings.TrimRight(item.MapKey, ".[]")
if exist := jsonObject.Exists(realMapKey); !exist {
if _, err = jsonObject.ArrayP(realMapKey); nil != err {
return "", err