Refines a query to match items whose specified property value contains a specified string.
The contains()
function refines a PublicPlansQueryBuilder
to
only match items where the value of the specified property contains the
specified string
. Matching with contains()
is case-sensitive, so
"TEXT"
does not contain "text"
.
You can only use contains()
with a property whose value is a String.
function contains(
propertyName: string,
string: string,
): PublicPlansQueryBuilder;
The property whose value will be compared with the string.
Supported property: slug
The string to look for inside the specified property value.
const newQuery = wixPricingPlansBackend
.queryPublicPlans()
.contains("slug", "free");
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.