1.1.0 • Published 6 years ago
json-token-replace v1.1.0
What does it do
Replace the token string {{hello}} in json with value from another json where key is token {"hello":"bye"}
Example:
Json with tokens:
{ "john":"Alex" }
Json:
{ "text": "hello {{john}}"}
Output:
{ "text": "hello Alex"}
Features
- ✓ Easy to use
Fast setup
- Run
npm install json-token-replace --save
- In your code:
const Jtr = require("json-token-replace");
const jtr = new Jtr();
let json_output = jtr.replace(require("./json_with_tokens.json"), require("./json.json"), "{{", "}}");
- If work add star :star: at this project :heart:
- If you want help me: donate on paypal or become a backer on patreon.
For advanced configuration see INSTALL.md.
GNU GENERAL PUBLIC LICENSE
Copyright (c) 2018 Patryk Rzucidło (PTKDev)