I am reading form a a file that print out of the following.
    {  
   "draw":0,
   "recordsTotal":3995,
   "recordsFiltered":1,
   "data":[  
      {  
         "customer_id":"1",
         "channel":"2",
         "date":"2017-03\/21 ",
         "earnings":"2500"
      },
      {  
         "customer_id":"2",
         "channel":"2",
         "date":"2017-03\/21 ",
         "earnings":"1500"
      }
   ]
}
is it possible in a separate php file to read this and to calcualte the total earnings?
i.e 2500 + 1500 = 4000
 
     
    