Retrieving JSON array from text file

Hi there all
I am fairly new to javascript and I am wondering how I would load a text file that has a JSON formatted array stored in it?
I can pass the array directly to the page via php though I want to be able to store the data and save on calls to the database and of course load the data dynamically to the page.

XMLHttpRequest can do this via JavaScript without having to reload the page. But it’s going to have to talk to a PHP file which will have to get the JSON from the database anyway, so it’s not going to save you on database calls.

The main advantage of XMLHttpRequests is that the user does not have to reload the page, i.e. they stay where they are but can get fresh bits of content from the server.