fullcalendar - Looping through event objects

fullcalendar - Looping through event objects

I can see alot of event objects when I use the alert after the ajax post success in my jquery below. Can someone please tell me how I can access details for each event and change them accordingly?

  1. eventSources: [

    {
                url: 'json-events.php',
                type: 'POST',
                error: function(data) {
                    alert('there was an error while fetching events!' + data.msge);
    },
               
    success: function(data) { 
               
         
    // I see lots of event objects using this alert
         
    alert(data);
                   
    // I would like to change the event details if approved == 1

    if(data.approved == "1") {
       
        var title = title + "approved";
      var className = "approved";
         
    } else{
         
              var title = title + "awaiting approval";
                // set classname but get error event udefined
              var className = "unapproved";
             
        }
        }
     
    }

         

    ]