Best way to query jsonb field

I can't find any relevent thread other than this one (helpQuerying PG table by JSONB field)

if i have a column like:
myData: jsonb('myData').$type<{a: {b: string} }>().notNull()

what is the best way to find a value where b === 'test'?
does this query work/make sense?
await db.query.someTable.findFirst({ where: eq(someTable.a.b, 'test'});
Was this page helpful?