0

I am trying to access the items inside the array in the 'properties' column when the activity is logged into the database, but I am not sure how to do it.

I have been able to get the log items from the 'properties' column in the table to my ActivityController but I am not sure what to do from there. I need to split it into the 'attributes' and 'old' arrays within the initial array to display to the user what has changed. I also further need to go into the 'attributes' and 'old' arrays to get the old and updated values.

I have tried passing it into the view and splitting in there but I have only been able to get the individual 'properties' arrays and display that with no formatting

{  
   "attributes":{  
      "first_name":"Kevingh"
   },
   "old":{  
      "first_name":"Kevin"
   }
}

// this is what the data looks like

I should have just the 'attributes' in one array variable and the 'old' in another to access each.

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64

0 Answers0