We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a products like this:
[ { name: 'Product 1', attributes: { width: '15', minimum_required_images: '1', height: '20', channels: ['web', 'mobile'] } }, { name: 'Product 2', attributes: { width: '25', minimum_required_images: '2', height: '30', channels: ['mobile'] }, } ]
I want to filter it by a channel or list of channels, for ex. I want to list only products with channels : ['mobile']
how should I achieve this?
The text was updated successfully, but these errors were encountered:
With Swell.js, you can filter products by attributes using the following syntax:
await swell.products.list({ $filters: { channel: ['mobile'] } })
See more examples in the docs https://developers.swell.is/frontend-api/products#filtering
Sorry, something went wrong.
It worked. Another workaround is:
await swell.products.list({ "attributes.channels": 'web', });
No branches or pull requests
I have a products like this:
I want to filter it by a channel or list of channels,
for ex. I want to list only products with channels : ['mobile']
how should I achieve this?
The text was updated successfully, but these errors were encountered: