Use to match values equal to a specified value.
Framework
React Svelte Vue Qwik (Beta) React Native REST API JS
Meta-Framework
None Remix Hydrogen Next.js (Pages Router) Next.js (App Router) Gatsby
Gen 1 (Recommended) Gen 2 import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $eq: 200 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $eq: 200 } },
...options,
});{ "data.price": { "$eq": 200 } }https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$eq":200}}builder.get('your-model', {
query: {
'data.myCustomProperty.$eq': 'sale'
}
})Use to match values greater than a specified value.
Framework
React Svelte Vue Qwik (Beta) React Native REST API JS
Meta-Framework
None Remix Hydrogen Next.js (Pages Router) Next.js (App Router) Gatsby
Gen 1 (Recommended) Gen 2 import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gt: 600 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gt: 600 } },
...options,
});{ "data.price": { "$gt": 200 } }https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$gt":200}}builder.get('your-model', {
query: {
'data.anotherCustomProperty.$gt': 50
}
})Use to match values greater than or equal to a specified value.
Framework
React Svelte Vue Qwik (Beta) React Native REST API JS
Meta-Framework
None Remix Hydrogen Next.js (Pages Router) Next.js (App Router) Gatsby
Gen 1 (Recommended) Gen 2 import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $gte: 700 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $gte: 700 } },
...options,
});{ "data.price": { "$gte": 200 } }https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$gte":200}}builder.get('your-model', {
query: {
'data.anotherCustomProperty.$gte': 50
}
})Use to match any of the values you specify in an array.
Framework
React Svelte Vue Qwik (Beta) React Native REST API JS
Meta-Framework
None Remix Hydrogen Next.js (Pages Router) Next.js (App Router) Gatsby
Gen 1 (Recommended) Gen 2 import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $in: ['Marketing', 'Engineering'] } },
...options,
});{ "data.price": { "$in": [ 300, 500, 700 ] } }https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$in":[300,500,700]}}When using the $in operator in a URL query parameter, put the values in an array and separate the values with commas.
You do not need quotes unless the values are a string.
{ "data.department": { "$in": ["Marketing", "Product"] } }https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.department":{"$in":["Marketing","Product"]}}builder.get('your-model', {
query: {
'data.evenMoreCustomAttributes.$in': '[1, 2, 3]'
}
})When querying an array of strings, use JavaScript notation and pass an array of strings to the $in operator.
builder.get('your-model', {
query: {
'data.evenMoreCustomAttributes.$in': '["myString1", "myString2", "myString3"]'
}
})Use to match values less than a specified value.
Framework
React Svelte Vue Qwik (Beta) React Native REST API JS
Meta-Framework
None Remix Hydrogen Next.js (Pages Router) Next.js (App Router) Gatsby
Gen 1 (Recommended) Gen 2 import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $lt: 455 } },
...options,
});import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...options,
});