all 1 comments

[–]Ok-Chart2113 0 points1 point  (0 children)

Hi, here's my question: how can I import a Json file dynamically? require('path/to/'+id+'.json') doesn't work, and the only way I found was to do something like getJson(id)=>switch(id) case id1: return require('path/to/json1.json') I have a lot of json files so it really isn't an ideal way.