0
How to Merge Multiple JSON Files using GULP

Open 0 Answers 25 Views Software and Applications

I found a quick solution in merging multiple JSON files into one JSON file using GULP.

Install Node.JS https://nodejs.org/en/

Run terminal/shell

npm i gulp -g
npm i gulp --save
npm i gulp-controlled-merge-json

Create gulpfile.js

var gulp = require('gulp');
var merge = require('gulp-controlled-merge-json');
gulp.task ("default"), function(){
gulp.src("*.json")
.pipe(merge("combined.json"))
.pipe(gulp.dest("./dist/"))
});

Run gulp

Watch this video: https://www.youtube.com/embed/QqVP7oZS_b4

Let me know below if you have others way to do it.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...