hasAll( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Refines a query to match items whose specified property contains all of the specified values.

The hasAll() function refines a ServicesQueryBuilder to match only items where the value of the specified propertyName equals all of the specified values. Matching strings with hasAll() is case-sensitive, so 'text' isn't equal to 'Text'. If the specified property is an array, hasAll() matches if that array's elements match all of the specified values.

Method Declaration
Copy
function hasAll(propertyName: string, value: Array<any>): ServicesQueryBuilder;
Method Parameters
propertyNamestring

Property whose value is compared with values.


valueArray<any>
Returns
JavaScript
const query = services.queryServices.hasAll("labelIds", [ "red", "blue", "purple", ]);
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?