I have a CakePHP4 App where I create a D3JS WorldMap in a <script> tag. I need to link to a JSON File in this line d3.json("https://api.jsonbin.io/b/61f8ec14518e5f3b2ab3e218", function(error, topology) { but this time its saved in webroot folder.
I have tried to get the Path console.log('<?php echo WWW_ROOT; ?>'); but it didnt work. How can I set the Path to my file over JavaScript?