What have you tried so far? Since jQuery is already included in your code, have you tried using it to do an AJAX request? I’m not talking yet about making the request when you click the button.
Basically it will boil down to the following:
- Perform an AJAX request with jQuery right when the page loads, then printing the result to the console.
- Adding a click listener to the button. Just make it print something to the console.
- Now instead of printing to the console, make the button click perform the AJAX request.
- Now instead of printing the whole JSON response to the console, find a way to somehow extract just the data that you need, then print just that.
- After that, find a way to display it in the
I recommend reading the jQuery docs. Particularly for items 1, 2 and 5.