I'm facing a straightforward problem with my React Native project. I am attempting to create a script that will be executed during the build process to fetch JSON data from a URL and then store it as a JSON file with a unique name in a specific directory. For instance, I need to retrieve JSON from www.example.com
and save it as a JSON file in
project/src/assets/locales/en.json
The challenge lies in finding relevant information on how to fetch and save JSON data, especially since most of the search results are geared towards Node.js, which may not be applicable to my current situation. Is the task I'm trying to accomplish feasible?