Created a function for loading JSON.