I am trying to connect with some database and use InDesign to publish data results. I would like to do it with JavaScript(I have OS Windows). Unfortunately Normal JavaScript fetch request doesn't work. I guess I should use some method from InDesign object model instead.
Example
fetch('https://swapi.dev/api/people')
.then(response => response.json())
.then(data => alert(data));