I'm making a webapp with the help of JQuery to keep track of goals & habits. One can add a main goal such as 'Discipline', and then afterwards can attach subgoals or habits to said main goal (e.g. 'work out everyday').
Organizing the array for main goals is obvious;
goals = ['Acceptance', 'Discipline', 'Accountability'];
I however have found no way in JQuery/Javascript to attach/add an array of items to a specific item in ANOTHER array.
Is there an easier way to do this, with JSON for example ?
Thanks in advance for any help offered