Added function to load JSON files into database