This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
ejs/searchGJson.go
2024-05-11 15:28:50 +02:00

23 lines
382 B
Go

package ejs
import (
"github.com/tidwall/gjson"
)
type SearchGJsoniString struct {
JsonPath string
CompareMethode string
Value string
}
func (s SearchGJsoniString) match(data []byte) bool {
value := gjson.Get(string(data), s.JsonPath)
switch s.CompareMethode {
case "=":
if value.String() == s.Value {
return true
}
return false
}
return false
}