Objects
Function | Description | Meta |
---|---|---|
json.filter |
Filters the object. For example: Arguments: Returns:object (object[any: any])object to filter paths (any<array[any<string, array[any]>], set[any<string, array[any]>]>)JSON string paths filtered (any)remaining data from | Wasm |
json.match_schema |
Checks that the document matches the JSON schema. Arguments: Returns:document (any<string, object[any: any]>)document to verify by schema schema (any<string, object[any: any]>)schema to verify document by output (array<boolean, array[object<desc: string, error: string, field: string, type: string>]>)
| v0.50.0 SDK-dependent |
json.patch |
Patches an object according to RFC6902. For example: Arguments: Returns:object (any)the object to patch patches (array[object<op: string, path: any>[any: any]])the JSON patches to apply output (any)result obtained after consecutively applying all patch operations in | v0.25.0 SDK-dependent |
json.remove |
Removes paths from an object. For example: Arguments: Returns:object (object[any: any])object to remove paths from paths (any<array[any<string, array[any]>], set[any<string, array[any]>]>)JSON string paths output (any)result of removing all keys specified in | v0.18.0 Wasm |
json.verify_schema |
Checks that the input is a valid JSON schema object. The schema can be either a JSON string or an JSON object. Arguments: Returns:schema (any<string, object[any: any]>)the schema to verify output (array<boolean, any<null, string>>)
| v0.50.0 SDK-dependent |
object.filter |
Filters the object by keeping only specified keys. For example: Arguments: Returns:object (object[any: any])object to filter keys keys (any<array[any], object[any: any], set[any]>)keys to keep in filtered (any)remaining data from | v0.17.2 Wasm |
object.get |
Returns value of an object's key if present, otherwise a default. If the supplied Arguments: Returns:object (object[any: any])object to get key (any)key to lookup in default (any)default to use when lookup fails value (any)
| Wasm |
object.keys |
Returns a set of an object's keys. For example: Arguments: Returns:object (object[any: any])object to get keys from value (set[any])set of | v0.47.0 Wasm |
object.remove |
Removes specified keys from an object. Arguments: Returns:object (object[any: any])object to remove keys from keys (any<array[any], object[any: any], set[any]>)keys to remove from x output (any)result of removing the specified | v0.17.2 Wasm |
object.subset |
Determines if an object Arguments: Returns:super (any<array[any], object[any: any], set[any]>)object to test if sub is a subset of sub (any<array[any], object[any: any], set[any]>)object to test if super is a superset of result (any)
| v0.42.0 SDK-dependent |
object.union |
Creates a new object of the asymmetric union of two objects. For example: Arguments: Returns:a (object[any: any])left-hand object b (object[any: any])right-hand object output (any)a new object which is the result of an asymmetric recursive union of two objects where conflicts are resolved by choosing the key from the right-hand object | v0.17.2 Wasm |
object.union_n |
Creates a new object that is the asymmetric union of all objects merged from left to right. For example: Arguments: Returns:objects (array[object[any: any]])list of objects to merge output (any)asymmetric recursive union of all objects in | v0.37.0 Wasm |
- When
keys
are provided as an object only the top level keys on the object will be used, values are ignored. For example:object.remove({"a": {"b": {"c": 2}}, "x": 123}, {"a": 1}) == {"x": 123}
regardless of the value for keya
in the keys object, the followingkeys
object gives the same resultobject.remove({"a": {"b": {"c": 2}}, "x": 123}, {"a": {"b": {"foo": "bar"}}}) == {"x": 123}
. - The
json
stringpaths
may reference into array values by using index numbers. For example with the object{"a": ["x", "y", "z"]}
the patha/1
referencesy
. Nested structures are supported as well, for example:{"a": ["x", {"y": {"y1": {"y2": ["foo", "bar"]}}}, "z"]}
the patha/1/y1/y2/0
references"foo"
. - The
json
stringpaths
support~0
, or~1
characters for~
and/
characters in key names. It does not support-
for last index of an array. For example the path/foo~1bar~0
will referencebaz
in{ "foo/bar~": "baz" }
. - The
json
stringpaths
may be an array of string path segments rather than a/
separated string. For example the patha/b/c
can be passed in as["a", "b", "c"]
.