---
url: https://talkjs.com/docs/UI_Components/React_Native/Object_Types/FieldPredicate/
title: "FieldPredicate | React Native | TalkJS Docs"
---

For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

# FieldPredicate

Filter fields by value or membership.

```typescript
type FieldPredicate<T> = ["==" | "!=", T] | ["oneOf" | "!oneOf", T[]];
```

A `FieldPredicate` is a 2-element array of structure: `[operator, operand]`.

Valid operators are: `"=="`, `"!="`, `"oneOf"`, `"!oneOf"`

The operand must either be a `string` or `string[]`(Array of strings). The latter is used with the `oneOf` operators.

## Used by

-   [`MessagePredicate`](https://talkjs.com/docs/UI_Components/React_Native/Components/Chatbox/#messagepredicate)
-   [`SenderFieldPredicate`](https://talkjs.com/docs/UI_Components/React_Native/Components/Chatbox/#senderfieldpredicate)
-   [`ConversationPredicate`](https://talkjs.com/docs/UI_Components/React_Native/Object_Types/ConversationPredicate/)
-   [`CustomFieldPredicate`](https://talkjs.com/docs/UI_Components/React_Native/Object_Types/CustomFieldPredicate/)
