# `block`

## Description

The `block` command filters out all documents where the given predicate evaluates to true. It is the inverse of `filter`, which keeps only documents that match the predicate.

## Syntax

```dataprime
block <boolean expression>
```

## Example

**Use case: Exclude successful HTTP responses**

In this example, we remove all documents representing successful (2xx) HTTP status codes to focus on redirects and errors.

### Example data

```json
{ "status_code": "200", "endpoint": "/api/login" },
{ "status_code": "301", "endpoint": "/api/redirect" },
{ "status_code": "500", "endpoint": "/api/payment" }
```

### Example query

```dataprime
block $d.status_code.startsWith('2')
```

### Example output

```json
  { "status_code": "301", "endpoint": "/api/redirect" },
  { "status_code": "500", "endpoint": "/api/payment" }
```
