Hi all, I have a question for future reference relating to the record collection exercise.
Is there a reason why when I tried to add the tracks property to records that didn’t have it at all using just :
collection[id][prop] = value;
It wouldn’t go through (pictured below), but when I make an empty “tracks” property and then push my value into it, it works?
I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
Remember, the “tracks” property is an array and not just a string. You can either do as @NULL_dev suggests or wrap [ ] around the value which will make it an array with one element (the value).