How can I access image sources from a JSON file without encountering a module error when using JSON objects as the source?
JSON FILE:
{
"Image": {"source": "./SourceFolder/ImageFile.png"}
}
JS FILE
const data = require('./jason.json');
var imageSource = JSON.stringify(data.Image);
imageSource = JSON.parse(imageSource);
<Image source={require(imageSource.source)} />