Hello to all, I beg a moment of time for help with JSON

So this is where I’m at with this exercise. I know that the instructions say “to add more album records, you can do this by adding records to the top level array.” BUUUUT I have no idea what that looks like and have failed to do that apparently. I’ve gone back to all the exercises where we do array commands; freaking anything to do with arrays at this point. I’ve googled a dozen variations of “Javascript” “JSON” and “ARRAY” and still have nothing to show for it. I’ve stubbornly been stuck on this for what feels like a week now. If one of you lovely people could show me what I’m doing wrong, I would be eternally grateful.

Sad Matt

You should only declare myMusic one time. After that, you can just assign a value to it. Also remember, that arrays have elements separated by commas. So, the array associated with the “formats” property of your added album should have elements separated by commas.

The easiest way to add an element to an array, is to add a comma and then an extra element. For example, if I was given the following array:

var myArray = [1, 2, 3, 4, 5];

and then told to add another element to it, I would just add the additional element onto the end of the original so the array looked like below:

var myArray = [1, 2, 3, 4, 5, 6];  // I just added the 6 to the original array
1 Like

Thank you for responding! Not sure if I had that small clerical error with the arrays before, but I’ll go back and work a little more. Hope to work it out soon. Thank you very much for the help!