func (r *Redigo) JSONArrIndex(key, path string, jsonValue interface{}, optionalRange ...int) (res interface{}, err error) {  
	args := []interface{}{key, path, jsonValue}
	ln := len(optionalRange)
	switch {
	case ln > 2:
		return nil, rjs.ErrTooManyOptionals
	case ln == 1:  
		args = append(args, optionalRange[0])
	case ln == 2:  
		args = append(args, optionalRange[0], optionalRange[1])
	}
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandARRINDEX, args...)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
JSONArrIndex returns the index of the json element provided and return -1 if element is not present

ReJSON syntax:
JSON.ARRINDEX <key> <path> <json-scalar> [start [stop]]
package clients
import (
	"fmt"
	redigo "github.com/gomodule/redigo/redis"
	"github.com/nitishm/go-rejson/v4/rjs"
	"strings"
)
type Redigo struct {
	Conn redigo.Conn  
}
func (r *Redigo) JSONSet(key string, path string, obj interface{}, opts ...rjs.SetOption) (res interface{}, err error) {
	if len(opts) > 1 {
		return nil, rjs.ErrTooManyOptionals
	}
	args := make([]interface{}, 0, 5)
	args = append(args, key, path, obj)
	if len(opts) == 1 {
		args = append(args, opts[0].Value()...)
	}
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandSET, args...)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONGet(key, path string, opts ...rjs.GetOption) (res interface{}, err error) {
	if len(opts) > 4 {
		return nil, rjs.ErrTooManyOptionals
	}
	args := make([]interface{}, 0)
	args = append(args, key, path)
	for _, op := range opts {
		args = append(args, op.Value()...)
	}
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandGET, args...)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONMGet(path string, keys ...string) (res interface{}, err error) {
	if len(keys) == 0 {
		return nil, rjs.ErrNeedAtLeastOneArg
	}
	args := make([]interface{}, 0)
	for _, key := range keys {
		args = append(args, key)
	}
	args = append(args, path)
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandMGET, args...)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONDel(key string, path string) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandDEL, key, path)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONType(key, path string) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandTYPE, key, path)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONNumIncrBy(key, path string, number int) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandNUMINCRBY, key, path, number)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONNumMultBy(key, path string, number int) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandNUMMULTBY, key, path, number)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONStrAppend(key, path, jsonstring string) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandSTRAPPEND, key, path, jsonstring)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONStrLen(key, path string) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandSTRLEN, key, path)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONArrAppend(key, path string, values ...interface{}) (res interface{}, err error) {
	if len(values) == 0 {
		return nil, rjs.ErrNeedAtLeastOneArg
	}
	args := make([]interface{}, 0)
	args = append(args, key, path)
	args = append(args, values...)
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandARRAPPEND, args...)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONArrLen(key, path string) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandARRLEN, key, path)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}
func (r *Redigo) JSONArrPop(key, path string, index int) (res interface{}, err error) {
	name, args, err := rjs.CommandBuilder(rjs.ReJSONCommandARRPOP, key, path, index)
	if err != nil {
		return nil, err
	}
	return r.Conn.Do(name, args...)
}