package tiem

import (
	"github.com/tidwall/gjson"
)

func JSONSelector(bytes []byte, jsonPath string) interface{} {
	if !gjson.ValidBytes(bytes) {
		return nil
	}
	return gjson.GetBytes(bytes, jsonPath).Value()
}
