Where is there an example of actually using a database object type in your code? Your tutorials and api docs are often worthless, because you never link to any real code being used.
Please help.
Thank you,
George
var selectedChildHistoryJSON = localStorage.getItem('_clipHistory');
var selectedClip = $(this).val();
var currentDate = new Date();
var selectedChildHistoryObj = JSON.parse(selectedChildHistoryJSON);
if (selectedChildHistoryObj === null) {
selectedChildHistoryObj = [];
}
Code: Select all
var arrayLength = selectedChildHistoryObj.length;
var dateString = currentDate.toUTCString();
var currentDateAndClip = {
clipDate: dateString,
clipValue: selectedClip
}
selectedChildHistoryObj[length] = currentDateAndClip;
selectedChildHistoryJSON = JSON.stringify(selectedChildHistoryObj);
localStorage.setItem('_clipHistory', selectedChildHistoryJSON);