diff --git a/apps/web/src/views/docs.ejs b/apps/web/src/views/docs.ejs index ea4df5a..134e485 100644 --- a/apps/web/src/views/docs.ejs +++ b/apps/web/src/views/docs.ejs @@ -500,6 +500,21 @@ Content-Type: application/json // $not - invert a condition { "$not": { "status": 500 } } +
These nest freely. You can put $or inside $and, $and inside $or, or go as deep as you want:
{
+ "$and": [
+ { "status": 200 },
+ {
+ "$or": [
+ { "$json": { "$.region": { "$eq": "us" } } },
+ { "$json": { "$.region": { "$eq": "eu" } } }
+ ]
+ }
+ ]
+}
+ $and and $or nest freely inside each other, as deep as you need.
{
+ "$and": [
+ { "status": { "$lt": 400 } },
+ {
+ "$or": [
+ { "$json": { "$.env": { "$eq": "production" } } },
+ { "$json": { "$.env": { "$eq": "staging" } } }
+ ]
+ },
+ {
+ "$or": [
+ { "$responseTime": { "$lt": 2000 } },
+ { "$json": { "$.cache": { "$eq": "hit" } } }
+ ]
+ }
+ ]
+}