[Deprecated] JST to get a value from an object using a JSON Pointer
npm install @itentialopensource/get-value-from-json-pointer* Overview
* Installation Prerequisites
* How to Install
* How to Run
* Additional Information
This can be compared to a file system (json file), where a path (json pointer) can direct you through a file system to the file you want to open (the value you want returned by the pointer).
Users must satisfy the following pre-requisites:
* Itential Automation Platform
* ^2022.1
To install the Pre-Built Transformation:
* Verify you are running a supported version of the Itential Automation Platform (IAP) as listed above in the Requirements section in order to install the Pre-Built.
* The Pre-Built can be installed from within App-Admin_Essential. Simply search for the name of your desired Pre-Built and click the install button.
Use the following to run the Pre-Built Transformation:
1. Once the JST is installed as outlined in the How to Install section above, navigate to the section in your workflow where you would like to convert a string to an object and add a JSON Transformation task.
2. Inside the Transformation task, search for and select getValueFromPointer (the name of the internal JST).
3. In the jsonPointer field, create a json pointer to the value you want returned.
4. In the obj field, enter the valid json.
5. Run the transformation.
Example 1
Consider you have the json:
```
{ "a":
{
"b": 2,
"c": 3
}
}"/a/b"
And the json pointer: "/a/c"
Running this through the transformation would return 2
Running would return 3"/a"
Running would return```
{
"b": 2,
"c": 3
}
A link to the json pointer ref can be found here