jsonLogicAdditionalOperators
const
jsonLogicAdditionalOperators:Record
<"startsWith"
|"endsWith"
, (a
:string
,b
:string
) =>boolean
>
Register these operators with jsonLogic
before applying the result
of formatQuery(query, 'jsonlogic')
.
Example
for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) {
jsonLogic.add_operation(op, func);
}
jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data);
Defined in
packages/react-querybuilder/src/utils/formatQuery/utils.ts:76
caution
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.