---
title: "And"
description: "Explore the logic of the AND condition in JSON Schema, with examples for testing sub-condition truth. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/behaviors/conditions/and"
---

# And

The `and` condition tests whether one or more sub-conditions are all true. This joins the sub-conditions together in a logical AND.

## JSON Schema

```
{
    "title": "And",
    "properties": {
        "conditions": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "config": {
                        "type": "object"
                    }
                }
            }
        }
    }
}
```

## Example #1

Suppose you wanted a condition to evaluate if:

- a node has `published` set to `true` AND
- a node's type is `my:article`

The condition could be written like this:

```
{
    "type": "and",
    "config": {
        "conditions": [{
            "type": "propertyEquals",
            "config": {
                "property": "published",
                "value": true
            }
        }, {
            "type": "typeEquals",
            "config": {
                "type": "my:article"
            }
        }]
    }

}
```
