-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix.standard-functions
- Loading branch information
Showing
5 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.13.1" | ||
".": "0.13.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
|
||
## Overview | ||
|
||
Welcome to our JSON Template Engine! This powerful tool simplifies transforming JSON data from one format to another, making it easier to manage and maintain complex integrations. | ||
Welcome to our JSON Template Engine! This powerful tool simplifies transforming JSON data from one format to another, making managing and maintaining complex integrations easier. | ||
|
||
### Why JSON Template Engine? | ||
|
||
|
@@ -74,11 +74,11 @@ engine.evaluate({ name: 'World' }); // => 'Hello World' | |
### Use CDN URL directly in the browser | ||
Latest URL: https://cdn.jsdelivr.net/npm/@rudderstack/json-template-engine/build/json-template.min.js | ||
<!-- x-release-please-start-version --> | ||
Versioned URL: https://cdn.jsdelivr.net/npm/@rudderstack/[email protected].1/build/json-template.min.js | ||
Versioned URL: https://cdn.jsdelivr.net/npm/@rudderstack/[email protected].2/build/json-template.min.js | ||
|
||
```html | ||
<script type="module"> | ||
import { JsonTemplateEngine } from 'https://cdn.jsdelivr.net/npm/@rudderstack/[email protected].1/build/json-template.min.js'; | ||
import { JsonTemplateEngine } from 'https://cdn.jsdelivr.net/npm/@rudderstack/[email protected].2/build/json-template.min.js'; | ||
const engine = JsonTemplateEngine.createAsSync(`'Hello ' + .name`); | ||
engine.evaluate({ name: 'World' }); | ||
</script> | ||
|
@@ -89,9 +89,12 @@ Refer this [example](/index.html) for more details. | |
|
||
[Demo](https://rudderlabs.github.io/rudder-json-template-engine/) | ||
|
||
### Playground | ||
Give the JSON template engine a try in our [playground](https://transformers-workflow-engine.rudderstack.com/#/json-template) without needing to install anything. | ||
|
||
## Features | ||
|
||
Template is a set of statements and result the last statement is the output of the template. | ||
The template consists of multiple statements, with the output being the result of the final statement. | ||
|
||
### Variables | ||
|
||
|
@@ -410,7 +413,7 @@ We can use compile time expressions to generate a template and then recompile it | |
If you are familiar with [JSON Paths](https://goessner.net/articles/JsonPath/index.html#), you can easily begin working with JSON templates by leveraging your existing knowledge through the mappings feature. | ||
**Example:** | ||
* Let's say we want to tranform the following data. | ||
* Let's say we want to transform the following data. | ||
* Input: | ||
```json | ||
{ | ||
|
@@ -451,7 +454,7 @@ If you are familiar with [JSON Paths](https://goessner.net/articles/JsonPath/ind | |
{ | ||
"description": "Copies properties of a to root level in the output", | ||
"input": "$.a", | ||
"output": "$", | ||
"output": "$" | ||
}, | ||
{ | ||
"description": "Combines first and last name in the output", | ||
|
@@ -460,6 +463,8 @@ If you are familiar with [JSON Paths](https://goessner.net/articles/JsonPath/ind | |
} | ||
] | ||
``` | ||
* Try this example in our [playground](https://transformers-workflow-engine.rudderstack.com/#/mappings?gist=e25a6ac769ee5719e928720f5c439169). | ||
For more examples, refer [Mappings](test/scenarios/mappings/) | ||
### Comments | ||
|