I have a data.js file with the following structure:
var DATA= {
"groups": [{
"id": "1",
"name": "group 1",
"subgroups": [{}, {}, ...]
}, ...],
...
}
Is it possible to load this file in my React app and make the DATA var available in any component (I will probably want to initiate Redux state with it), if I can't use export in this file and can't turn it into regular JSON file? Basically I can't edit this file. How can it be achieved?