Skip to main content

matches

Function matches 

Source
pub fn matches(metadata: &Value, filter: &Value) -> bool
Expand description

Evaluate a metadata filter against a JSON document.

Supports exact match, comparison, and logical operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists, $contains (substring match), $regex (regex pattern match), $and, $or, $not.

Field paths support dot notation: { "user.name": { "$eq": "alice" } }.