I have an object that holds alerts and some information about them:
var alerts = { 1: { app: 'helloworld', message: 'message' }, 2: { app: 'helloagain', message: 'another message' } }
In addition to this, I have a variable that says how many alerts there are, alertNo. My question is, when I go to add a new alert, is there a way to append the alert onto the alerts object?
How about storing the alerts as records in an array instead of properties of a single object ?
And then to add one, just use
push: