I am having trouble with Json filtering and am get...
# orm-help
t
I am having trouble with Json filtering and am getting a typescript error. It seems to not know of the path key: https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filter-on-object-property I am using prisma 3.2.1.
Copy code
const worker = { id: '1' };

      const calls = await this.prisma.call.findMany({
        where: {
          CallEvents: {
            some: { data: { path: '$.workerId', equals: worker.id } },
          },
        },
      });
with the error
Copy code
TS2322: Type '{ path: string; equals: string; }' is not assignable to type 'JsonFilter | undefined'.   Object literal may only specify known properties, and 'path' does not exist in type 'JsonFilter'.
r
@Thomas Schaaf 👋 Did you add the
jsonFilter
preview feature as shown here? After adding this, run
prisma generate
and you’ll get the properties.