--- id: 56533eb9ac21ba0edf2244cb title: Manipulating Complex Objects challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(Array.isArray(myMusic), "myMusic should be an array");' - text: '' testString: 'assert(myMusic.length > 1, "myMusic should have at least two elements");' - text: '' testString: 'assert(typeof myMusic[1] === "object", "myMusic[1] should be an object");' - text: '' testString: 'assert(Object.keys(myMusic[1]).length > 3, "myMusic[1] should have at least 4 properties");' - text: '' testString: 'assert(myMusic[1].hasOwnProperty("artist") && typeof myMusic[1].artist === "string", "myMusic[1] should contain an artist property which is a string");' - text: '' testString: 'assert(myMusic[1].hasOwnProperty("title") && typeof myMusic[1].title === "string", "myMusic[1] should contain a title property which is a string");' - text: '' testString: 'assert(myMusic[1].hasOwnProperty("release_year") && typeof myMusic[1].release_year === "number", "myMusic[1] should contain a release_year property which is a number");' - text: '' testString: 'assert(myMusic[1].hasOwnProperty("formats") && Array.isArray(myMusic[1].formats), "myMusic[1] should contain a formats property which is an array");' - text: '' testString: 'assert(myMusic[1].formats.every(function(item) { return (typeof item === "string")}) && myMusic[1].formats.length > 1, "formats should be an array of strings with at least two elements");' ```
## Challenge Seed
```js var myMusic = [ { "artist": "Billy Joel", "title": "Piano Man", "release_year": 1973, "formats": [ "CD", "8T", "LP" ], "gold": true } // Add record here ]; ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```