I am working on a project with node.js, where there are multiple JSON files in a folder say FILES and I have to access contents of the files. One approach is to use
var a = require('jsonfile')
And then perform the required queries.
But suppose if I have around 20 files, it would be a headache to write them all with the require function, is there a better way to do this. I know Mongodb can be used in this case, but I want to be to use JSON files. Is there a better way to solve this problem?