$(document).ready(function() {
      $.ajax({
        url: 'data.json',     // path to your JSON file
        dataType: 'json',     // expect JSON
        cache: false,         // optional: prevent caching
        success: function(data) {
          // Assign values to variables
          let userName = data.name;
          let userAge = data.age;
          let userEmail = data.email;

          console.log('✅ JSON loaded successfully!');
          console.log('Name:', userName);
          console.log('Age:', userAge);
          console.log('Email:', userEmail);
        },
        error: function(xhr, status, error) {
          console.error('❌ Error loading JSON file:');
          console.error('Status:', status);
          console.error('Error:', error);
          console.error('Response:', xhr.responseText);
        }
      });
    });