Hi guys, new to shopify dev but learning by making a basic email abandon cart system. I did the tutorial but am currently stuck on how to actually perform an API call with the url to retrieve the JSON file. I have used the API key and can do that in the browser but not sure how to do that in a .js file. I am also unsure as to how exactly I can press a button on the UI to trigger this call to view the data received. I am not new to programming but I am new to react.
I have looked around and on youtube but I still cannot find any information on how I can return JSON contents or how to handle them.