rex_hash
Introduction
Access JSON structure table.
Access JSON structure table.
Usage
Load
Sample capx
Call "Action:Load from JSON" to load content with JSON string. Dump the content by "Expression:AsJSON".
Call "Action:Clean all" to clean content and set to an empty object "{}". Load content by "[]" if user needs an array.
Sample capx
Call "Action:Load from JSON" to load content with JSON string. Dump the content by "Expression:AsJSON".
Call "Action:Clean all" to clean content and set to an empty object "{}". Load content by "[]" if user needs an array.
Read
There are two ways to get value by keys.
There are two ways to get value by keys.
- Expression:At( keys ) : Key string could be composed of multiple keys joined with ".".
- Expression:At( keys , default_value ) : return default value if keys does not exist.
- Expression:AtKeys( key0, key1, ... ) : put keys in each parameter.
Retrieve keys
Sample capx
Retrieve keys and values in an object by "Condition:For each item", "Expression:CurKey", "Expression:CurValue". Get sub-item with a key by "Expression:CurValue( keys )". Loop index byExpression:Loopindex".
Sample capx
Retrieve keys and values in an object by "Condition:For each item", "Expression:CurKey", "Expression:CurValue". Get sub-item with a key by "Expression:CurValue( keys )". Loop index byExpression:Loopindex".
Put keys into official array
Sample capx
Here is another way to retrieve keys -
Sample capx
Here is another way to retrieve keys -
- Call "Action:Pick keys" to put all keys of an object into an official array.
- Read keys in this official array.
Key exists
"Condition:Key exists" will return true if key exists.
"Condition:Key exists" will return true if key exists.
Write
Call "Action:Set value" to set a number or string value at a key, or call "Action:Set JSON" to set a JSON object at a key. Parameter key could be multiple keys like "b.d".
Call "Action:Add to" to add a value to a key. (sample capx)
Call "Action:Set value" to set a number or string value at a key, or call "Action:Set JSON" to set a JSON object at a key. Parameter key could be multiple keys like "b.d".
Call "Action:Add to" to add a value to a key. (sample capx)
Remove key
Call "Action:Remove key" to remove a key.
Call "Action:Remove key" to remove a key.
Array operation
There are some actions for array operations.
There are some actions for array operations.
- Action:Sort (sample capx)
- Action:Shuffle (sample capx) : change the order of items in an array
- Action:Push JSON (sample capx) : add an item into an array
Save load
This plugin supports official save/load.
This plugin supports official save/load.