Filter products by attribute value
This method allows you to filter products by a specific attribute value using condition markers. In this example, we filter products where the "currency" attribute equals "USD".
โ
Purpose of the scenario:
- Define attribute filter conditions
- Form filters array and pass as filter
- Apply Filter and review results
โ
What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- Products with a "currency" string attribute
- A target attribute value to match against
๐ Important:
- These examples do not include error handling.
- You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
- Available conditionMarkers: "eq" (equals), "neq" (not equals), "in" (in list), "nin" (not in list), "mth" (more than), "lth" (less than), "exs" (exists), "nexs" (not exists).
๐ See in documentation:
๐ฆ SDK reference:
Loading sandboxโฆ
