Querying Cheatsheet
This document is a quick reference for query operators you can use to query anything that's on your content objects.
To experiment with querying your content from within Builder, you can use the Builder API Explorer.
This document covers the following operators:
Tip: Custom queries can be slower than typical queries with Builder. Keep this in mind as you write queries, particularly ones that interact with large data sets.
MongoDB style queries for your Builder data
When querying Builder data, you can use MongoDB-style operators. Some examples are below.
Querying text values that appear as numbers
When querying a text value that could appear as a number, such as 123, include single quotes around the value. For example, the following query retrieves an entity with an associated product ID of 12345. Notice the pair of single quotes within the double quotes.
Keep in mind that, when working with user-entered data, values may not always be what you expect. When using dynamic values, consider always wrapping text values with single quotes.
| Operator | Description |
|---|---|
| Use to match values equal to a specified value. 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,
}); Query value example: { "data.price": { "$eq": 200 } } Complete request: 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. 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,
}); Query value example: { "data.price": { "$gt": 200 } } Complete request: 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. 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,
}); Query value example: { "data.price": { "$gte": 200 } } Complete request: 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. 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,
}); Query value example: { "data.price": { "$in": [ 300, 500, 700 ] } } Complete request: https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$in":[300,500,700]}} When using the You do not need quotes unless the values are a string. Query value example: { "data.department": { "$in": ["Marketing", "Product"] } } Complete request: 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 builder.get('your-model', {
query: {
'data.evenMoreCustomAttributes.$in': '["myString1", "myString2", "myString3"]'
}
}) |
| Use to match values less than a specified value. 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,
}); 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,
}); 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,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...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': { $lt: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...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': { $lt: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lt: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
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,
}); 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,
}); Query value example: { "data.price": { "$lt": 500 } } Complete request: https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$lt":500}} builder.get('your-model', {
query: {
'data.evenMoreCustomProperty.$lt': 100
}
}) |
| Use to match values that are less than or equal to a specified value. import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...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': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...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': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...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': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...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': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...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': { $lte: 455 } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.price': { $lte: 455 } },
...options,
}); Query value example: { "data.price": { "$lte": 500 } } Complete request: https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$lte":500}} builder.get('your-model', {
query: {
'data.evenMoreCustomProperty.$lte': 100
}
}) |
| Use to match all values not equal to a specified value. 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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...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': { $ne: 'Human Resources' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $ne: 'Human Resources' } },
...options,
}); Query value example: { "data.department": { "$ne": "Marketing" } } Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.department":{"$ne":"Marketing"}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$ne': 'womens'
}
}) |
| Given an array of values, 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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...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': { $nin: ['Product', 'Marketing'] } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $nin: ['Product', 'Marketing'] } },
...options,
}); Query value example: {
"data.department": {
"$nin": [ "Marketing", "Engineering" ]
}
} Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.department":{"$nin":["Marketing","Engineering"]}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$nin': '[50, 51]'
}
}) |
| Provide one or more expressions to match to the specific field. import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...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': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...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': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...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': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...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': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...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': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$and: [{ $lt: 1000 }, { $gt: 500 }],
},
},
...options,
}); Query value example: {
"$and": [
{ "data.department": { "$eq":"Marketing" } },
{ "data.surname": { "$eq": "Herrera" } }
]
} Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"$and":[{"data.department":{"$eq":"Marketing"}},{"data.surname":{"$eq":"Herrera"}}]} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$and': "[
{ item: { $ne: 'hat' } }, { item: { $exists: true } }
]"
}
}) |
| Inverts the effect of a query expression and returns documents that do not match the query expression. 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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...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': { $not: 'Marketing' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.department': { $not: 'Marketing' } },
...options,
}); Query value example: { "data.price": { "$not": { "$gt": 400 } } } Complete request: https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$not":{"$gt":"400"}}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$not': 'hat'
}
}) |
| Use to join query clauses with a logical import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...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.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...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.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...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.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...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.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...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.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.surname': {
$or: [{ $eq: 'Moore' }, { $in: ['Moor', 'More'] }],
},
},
...options,
}); Query value example: {
"$or": [
{ "data.department": { "$eq":"Marketing" } },
{ "data.surname": { "$eq": "Herrera" } }
]
} Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"$or":[{"data.department":{"$eq":"Marketing"}},{"data.surname":{"$eq":"Herrera"}}]} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$or': '[
{ quantity: { $gt: 5 } }, { price: 100 }
]'
}
}) |
| Use to join query clauses with a logical import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('product', {
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...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': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...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': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...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': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...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': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...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': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: {
'data.price': {
$nor: [{ $lt: 500 }, { $gt: 1000 }],
},
},
...options,
}); Query value example: {
"$nor": [
{ "data.department": { "$eq":"Marketing" } },
{ "data.surname": { "$eq": "Herrera" } }
]
} Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"$nor":[{"data.department":{"$eq":"Marketing"}},{"data.surname":{"$eq":"Herrera"}}]} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$nor': '[
{ price: 100 }, { closeout: true }
]'
}
}) |
| Use to match documents that have the specified field. import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...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.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...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.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...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.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...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.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...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.preferredName': { $exists: true } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.preferredName': { $exists: true } },
...options,
}); Query value example: { "data.preferredName": { "$exists": true } } Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.preferredName":{"$exists":true}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$exists': true
}
}) |
| Use to select documents if a field is of the specified type. import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...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.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...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.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...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.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...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.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...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.employmentDate': { $type: Date } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.employmentDate': { $type: Date } },
...options,
}); Query value example: { "data.price": { "$type": "number" } } Complete request: https://cdn.builder.io/api/v3/content/product?options.product.query={"data.price":{"$type":"number"}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$type': boolean
}
}) |
| Use this operator to select documents if a property has an array as a value. Within Builder the List type will return an array, the values of which can be operated on by import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...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.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...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.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...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.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...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.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...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.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.regions': { $elemMatch: { location: 'US West' } } },
...options,
}); Query value example: {
"data.regions": {
"$elemMatch": { "location": "US West" }
}
} Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.regions":{"$elemMatch":{"location":"US%20West"}}} builder.get('your-model', {
query: {
'data.anotherCustomProperty.$elemMatch': {
item: { $ne: 'hat' }
}
}
}) |
| Use to select documents where values match a specified regular expression. import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...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.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...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.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...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.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...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.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...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.surname': { $regex: '^Ha.*' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: '^Ha.*' } },
...options,
}); Query value example: { "data.surname": { "$regex": "^H.*" } } Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.surname":{"$regex":"^H.*"}} builder.get('your-model', {
query: {
'data.someNumber.$regex': /pattern/
}
}) |
| Use to specify options to use with import { builder } from '@builder.io/react';
import type { GetContentOptions } from '@builder.io/sdk';
export const getProduct = (options: GetContentOptions) =>
builder.get('contact-record', {
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...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.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...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.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...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.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...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.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-svelte';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-vue';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-qwik';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...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.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); import { fetchOneEntry, GetContentOptions } from '@builder.io/sdk-react';
export const getProduct = (options: GetContentOptions) =>
fetchOneEntry({
query: { 'data.surname': { $regex: 'ha.*', $options: 'i' } },
...options,
}); Query value example: { "data.surname": { "$regex": "^m.*", "$options": "i" } } Complete request: https://cdn.builder.io/api/v3/content/contact-record?options.contact-record.query={"data.surname":{"$regex":"^m.*","$options":"i"}} builder.get('your-model', {
query: {
'data.someNumber.$regex':
'pattern&query.data.someNumber.$options=gi'
}
}) For more detail about available options, refer to the MongoDB |
Descriptions for the above operators adapted from MongoDB per the Creative Commons License as referenced on the MongoDB Documentation GitHub repo. For more in-depth information on the query operators above, see MongoDB's documentation on Query and Projection Operators.
What's next
For more information on querying, see the Content API documentation.