All Collections
IT/Security
Integrations
Set up JSON item object path
Set up JSON item object path
Ha Ngan Nguyen avatar
Written by Ha Ngan Nguyen
Updated over a week ago

Creative Force now supports a part of JSONPath syntax. Setting up a JSON item object path will let Creative Force use JSONPath in assertions to specify the JSON fields that need to be verified.

List of JSONPath syntax support

The JSONPath expression specifies a path to an element (or a set of elements) in a JSON structure. Below is the list of syntax elements that we support.

Expression

Description

$

The root object or array.

.property

Selects the specified property in a parent object

["property"]

Selects the specified property in a parent object.

Tip: Use this notation if the property name contains special characters such as spaces, or begins with a character other than A..Za..z_.

[n]

Selects the n-th element from an array. Indexes are 0-based.

*

Wildcard selects all elements in an object or an array, regardless of their names or indexes. For example, address.* means all properties of the address object, and items[*] means all items of the items array.

Examples valid path

[*]

$.items[*]

["base item"].options[*]

["base item"].options[*].product

Did this answer your question?