Using JSONPath to validate numbers with specific initial digits
Learn how to use JSONPath expressions to filter and validate numbers based on their starting digits.
Validating numbers with JSONPath
$[?(@.body.orderId =~ /^0.*/i || @.body.orderId =~ /^1.*/i || @.body.orderId =~ /^2.*/i || @.body.orderId =~ /^3.*/i)]Example
{ "body": { "orderId": "12345" } }Last updated
Was this helpful?