Skip to content

Commit

Permalink
bugfix - resolve issue #1155
Browse files Browse the repository at this point in the history
  • Loading branch information
kapishmalik committed Nov 29, 2024
1 parent c81caa0 commit 3005874
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,14 @@ func jsonPath(query, toMatch string) interface{} {
return ""
}

// Jsonpath library converts large int into a string with scientific notion, the following
// reverts that process to avoid mismatching when using the jsonpath result for csv data lookup
floatResult, err := strconv.ParseFloat(result, 64)
// if the string is a float and a whole number
if err == nil && floatResult == float64(int64(floatResult)) {
intResult := int(floatResult)
result = strconv.Itoa(intResult)
}
//// Jsonpath library converts large int into a string with scientific notion, the following
//// reverts that process to avoid mismatching when using the jsonpath result for csv data lookup
//floatResult, err := strconv.ParseFloat(result, 64)
//// if the string is a float and a whole number
//if err == nil && floatResult == float64(int64(floatResult)) {
// intResult := int(floatResult)
// result = strconv.Itoa(intResult)
//}

// convert to array data if applicable
var data interface{}
Expand Down

0 comments on commit 3005874

Please sign in to comment.