JS browser utility to show n fetch JSON data in an editor

Hi, I wanted to make a browser side utility which can fetch some json data form given url or file, and show that data in editor on browser web page.
Now i got all thing like i used ACE-Jsoneditor to fetch n display the data.
I wanted to make it a general utility which can be used in any (Angular, react) javascript framework. I tried to use web componenets to do so, but this is not a correct way.
Can you help me to find a better way to do so.

Thanks in advance.

Are you trying to capture JSON from a web request or URL and just display it in a text area?