I ran into a problem when dynamically attempting to retrieve an object row based on a variable. What would be a good work around to the following situation?
function getDetails(id) {
completeID = "event" + id;
title = eventDetails.completeID.title;
}
var eventDetails = {
'event1': {
'title': 'Lisbon Earthquake',
'content': "Test Content",
},
'event2': {
'title': 'Falling Stars',
'content': 'Test Content'
}
};