Given a database with records like the following Table: AuditLog Fields: ID | USERID | TYPE | TIME | DATA
id:1, userId:1, type:PHOTO, time:2008-10-15 12:00:00, data:{photoId:2089, photoName:A trip to the beach}
Lets say the database had 50 records, with Rails How can I loop through the results as follows:
- id, user_id, data.photoID, data.PhotoName
The main thing I don't get is how to extract what's inside the data column, the has that's inserted int the db field.
Thanks