{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6079","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6079/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6079/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6079/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6079","id":126114572,"number":6079,"title":"Checkpoint: Record Collection","user":{"login":"Hemalatah","id":11727944,"avatar_url":"https://avatars.githubusercontent.com/u/11727944?v=3","gravatar_id":"","url":"https://api.github.com/users/Hemalatah","html_url":"https://github.com/Hemalatah","followers_url":"https://api.github.com/users/Hemalatah/followers","following_url":"https://api.github.com/users/Hemalatah/following{/other_user}","gists_url":"https://api.github.com/users/Hemalatah/gists{/gist_id}","starred_url":"https://api.github.com/users/Hemalatah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hemalatah/subscriptions","organizations_url":"https://api.github.com/users/Hemalatah/orgs","repos_url":"https://api.github.com/users/Hemalatah/repos","events_url":"https://api.github.com/users/Hemalatah/events{/privacy}","received_events_url":"https://api.github.com/users/Hemalatah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T07:13:20Z","updated_at":"2016-01-12T07:25:37Z","closed_at":null,"body":"Challenge [Checkpoint: Record Collection](http://www.freecodecamp.com/challenges/checkpoint-record-collection) has an issue.\r\nConsidering secong condition of update function,\r\n'value' is not pushed in to the array of prop, it saved as string instead.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nMy code:\r\n```javascript\r\n// Setup\r\nvar collection = {\r\n    2548: {\r\n      album: \"Slippery When Wet\",\r\n      artist: \"Bon Jovi\",\r\n      tracks: [ \r\n        \"Let It Rock\", \r\n        \"You Give Love a Bad Name\" \r\n      ]\r\n    },\r\n    2468: {\r\n      album: \"1999\",\r\n      artist: \"Prince\",\r\n      tracks: [ \r\n        \"1999\", \r\n        \"Little Red Corvette\" \r\n      ]\r\n    },\r\n    1245: {\r\n      artist: \"Robert Palmer\",\r\n      tracks: [ ]\r\n    },\r\n    5439: {\r\n      album: \"ABBA Gold\"\r\n    }\r\n};\r\n// Keep a copy of the collection for tests\r\nvar collectionCopy = JSON.parse(JSON.stringify(collection));\r\n\r\n// Only change code below this line\r\nfunction update(id, prop, value) {\r\n  //collection[i];\r\n  if (value !== \"\" && collection[id][prop] !== \"tracks\") {\r\n    collection[id][prop] = value;\r\n  } else if (value !== \"\" && collection[id][prop] === \"tracks\") {\r\n    collection[id][prop].push(value);\r\n  } else if (value === \"\") {\r\n    delete collection[id][prop];\r\n  }\r\n  return collection;\r\n\r\n\r\n}\r\n\r\n// Alter values below to test your code\r\nupdate(1245, \"tracks\", \"Addicted to Love\");\r\n\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/comments/170822451","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6079#issuecomment-170822451","issue_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6079","id":170822451,"user":{"login":"SaintPeter","id":553494,"avatar_url":"https://avatars.githubusercontent.com/u/553494?v=3","gravatar_id":"","url":"https://api.github.com/users/SaintPeter","html_url":"https://github.com/SaintPeter","followers_url":"https://api.github.com/users/SaintPeter/followers","following_url":"https://api.github.com/users/SaintPeter/following{/other_user}","gists_url":"https://api.github.com/users/SaintPeter/gists{/gist_id}","starred_url":"https://api.github.com/users/SaintPeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaintPeter/subscriptions","organizations_url":"https://api.github.com/users/SaintPeter/orgs","repos_url":"https://api.github.com/users/SaintPeter/repos","events_url":"https://api.github.com/users/SaintPeter/events{/privacy}","received_events_url":"https://api.github.com/users/SaintPeter/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T07:25:37Z","updated_at":"2016-01-12T07:25:37Z","body":"You need to test `prop` to see if it is equal to \"tracks\".  Right now you're testing then CONTENT of whatever `collection[id][prop]` is pointing to, which will never be \"tracks\".\r\n\r\nIn the future you should ask for help in the [Help Chat Room](https://gitter.im/FreeCodeCamp/Help?utm_source=share-link&utm_medium=link&utm_campaign=share-link).  Issues are for bugs with the site.\r\n\r\nThanks and Happy Coding!"}}