Intro
Below is a comprehensive list of Object data formatters available in App Connect (client-side), accompanied by explanations outlining the purpose and functionality of each.
Object Formatters
Keys:
- Returns an array containing all keys of the object.
- Example:
({name: 'John', age: 30}).keys()returns['name', 'age']
Values:
- Returns an array containing all values of the object.
- Example:
({name: 'John', age: 30}).values()returns['John', 30]
Has Key:
- Checks if the object contains the specified key.
- Example:
({name: 'John'}).hasKey('name')returnstrue
Has Value:
- Checks if the object contains the specified value.
- Example:
({name: 'John'}).hasValue('John')returnstrue
Get Value Or Key:
- Returns the value for the specified key, or returns the key itself if the value is null or undefined.
- Example:
({name: 'John'}).getValueOrKey('name')returns'John'
JSON:
- Converts the object to a JSON string.
- Example:
({name: 'John'}).json()returns'{"name":"John"}'