Here’s 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
Let me know below if you have others way to do it.
This post was created with our nice and easy submission form. Create your post!