OCLOperators JsonGetProp
No edit summary
No edit summary
Line 1: Line 1:
The JsonGetProp operator is for JSON strings and returns the value of a JSON property as a string. Null is returned if the property is not available.
The JsonGetProp operator is for JSON strings and returns the value of a JSON property as a string. Null is returned if the property is unavailable.


The JsonGetProp operator can be chained to get a nested JSON value.
The JsonGetProp operator can be chained to get a nested JSON value.
Line 13: Line 13:
  25
  25


==== Other Pages ====
==== See also: ====


* [[Documentation:OCLOperators JSonToObjects|OCL Operator JsonToObjects]]
* [[Documentation:OCLOperators JSonToObjects|OCL Operator JsonToObjects]]

Revision as of 05:41, 19 August 2024

This page was created by Charles on 2024-08-16. Last edited by Edgar on 2025-01-20.

The JsonGetProp operator is for JSON strings and returns the value of a JSON property as a string. Null is returned if the property is unavailable.

The JsonGetProp operator can be chained to get a nested JSON value.

Example: 1

'{name: "Samuel"}'.JsonGetProp('name')

Returns

'Samuel'

Example: 2

'{person: {name: "Samuel", age: 25}}'.JsonGetProp('person').JsonGetProp('age')

Returns

25

See also:

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments