Skip to content

Commit

Permalink
Merge pull request #108 from k1LoW/fix-recordToMap
Browse files Browse the repository at this point in the history
Fix recordToMap
  • Loading branch information
k1LoW authored Aug 22, 2022
2 parents 3296052 + bc89f05 commit c21cf63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ func (o *operator) recordToArray(v map[string]interface{}) {
}

func (o *operator) recordToMap(v map[string]interface{}) {
if o.store.loopIndex != nil && *o.store.loopIndex > 0 {
// delete values of prevous loop
delete(o.store.stepMaps, o.steps[len(o.store.stepMaps)-1].key)
}
o.store.stepMaps[o.steps[len(o.store.stepMaps)].key] = v
}

Expand Down

0 comments on commit c21cf63

Please sign in to comment.