Document Functions¶
Quick Reference¶
| Function | Description |
|---|---|
DOCUMENT_CONTAINS | Returns true if the document contains the given key. |
DOCUMENT_GET | Returns the value for a given key in the document. |
DOCUMENT_KEYS | Returns the list of keys in the given document. |
DOCUMENT_MERGE | Returns a new document that is the result of merging two doc... |
DOCUMENT_REMOVE | Returns a new document with the specified key removed. |
DOCUMENT_VALUES | Returns the list of values in the given document. |
Function Details¶
DOCUMENT_CONTAINS¶
Returns true if the document contains the given key.
Parameters:
| Name | Type | Description |
|---|---|---|
doc | DOCUMENT | The input document. |
key | STRING | The key to check in the document. |
Returns: BOOLEAN - True if the document contains the key, false otherwise.
Examples:
DOCUMENT_GET¶
Returns the value for a given key in the document.
Parameters:
| Name | Type | Description |
|---|---|---|
doc | DOCUMENT | The input document. |
key | STRING | The key to retrieve from the document. |
Returns: ANY - The value associated with the given key.
Examples:
DOCUMENT_KEYS¶
Returns the list of keys in the given document.
Parameters:
| Name | Type | Description |
|---|---|---|
doc | DOCUMENT | The input document. |
Returns: ARRAY OF STRING - An array of keys from the document.
Examples:
DOCUMENT_MERGE¶
Returns a new document that is the result of merging two documents.
Parameters:
| Name | Type | Description |
|---|---|---|
doc1 | DOCUMENT | The first document. |
doc2 | DOCUMENT | The second document. |
Returns: DOCUMENT - A new document containing all keys and values from both documents.
Examples:
DOCUMENT_REMOVE¶
Returns a new document with the specified key removed.
Parameters:
| Name | Type | Description |
|---|---|---|
doc | DOCUMENT | The input document. |
key | STRING | The key to remove from the document. |
Returns: DOCUMENT - A new document without the specified key.
Examples:
DOCUMENT_VALUES¶
Returns the list of values in the given document.
Parameters:
| Name | Type | Description |
|---|---|---|
doc | DOCUMENT | The input document. |
Returns: ARRAY - An array of values from the document.
Examples: