You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the token string {{hello}} in json with value from another json where key is token {"hello":"bye"}
@@ -27,18 +28,13 @@ Output:
27
28
*[✓] Easy to use
28
29
29
30
## Fast setup
30
-
1. Add dependencies on `package.json`
31
-
```
32
-
"dependencies": {
33
-
"json-token-replace": "^1.0.0",
34
-
}
35
-
```
31
+
1. Run `npm install json-token-replace --save`
36
32
2. In your code:
37
33
```
38
34
const Jtr = require("json-token-replace");
39
35
const jtr = new Jtr();
40
36
41
-
let json_output = jtr.replace("./json_with_tokens.json", "./json.json");
37
+
let json_output = jtr.replace(require("./json_with_tokens.json"), require("./json.json"));
42
38
```
43
39
3. If work add star :star: at this project :heart:
44
40
4. If you want help me: <b><ahref="http://paypal.ptkdev.io">donate on paypal</a></b> or become a <b><ahref="http://patreon.ptkdev.io">backer on patreon</a></b>.
0 commit comments