How to pass json object from javascript to React Js

I am new to react js. I have a legacy application which is built in Servlet and Jsp. I need to convert a table built in html to datatable using react js. We are particular about react js as the management does not want to use Jquery/Vanilla js datatables.
My first approach was to convert the servlet to a service and make it return json object, however I can’t access the servlet externally (from VS code) due to session management.
So I tried to use CDN approach(react and react-table) within the JSP file using JSX, however I am unable to load react-table in JSX.
Second approach is to convert the array as a json object and pass it to React Js component, however I am not sure how to do this.

Question 1) What is the best approach to convert the html table to react datatable?
Can you provide sample code for this?
Question 2) How to pass json object to React JS?
Can you provide sample code for this?