# Need help with Twitch tv project

**URL:** <https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112>\
**Category:** General\
**Created:** [September 8, 2016, 2:09pm UTC](https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112 "2016-09-08T14:09:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhics21](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/abhics21/32/15891_2.png) [@abhics21](https://forum.freecodecamp.org/u/abhics21)\
**Post date:** [September 8, 2016, 2:09pm UTC](https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112/1 "2016-09-08T14:09:21Z")

</div>

I am stuck for hours and currently have no idea why the assignment of channel names as property to objects is not working,  
see getjson section of my javascript section and review my code for channel name assignment to channels object.  
my project link is [http://codepen.io/AronStone/pen/qadmkz?editors=0011](http://codepen.io/AronStone/pen/qadmkz?editors=0011)  
and i have made a tester version by clearing css and adding console log here [http://codepen.io/AronStone/pen/XjbazV?editors=0011](http://codepen.io/AronStone/pen/XjbazV?editors=0011)  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![bubulblu](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bubulblu/32/2364_2.png) [@bubulblu](https://forum.freecodecamp.org/u/bubulblu)\
**Post date:** [September 8, 2016, 8:06pm UTC](https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112/2 "2016-09-08T20:06:57Z")

</div>

Hi,

First of all, you have the same error in different places in you code.

Lines 8, 16, 25, you wrote this var `html=;` Replace it by var `html="";`

Secondly, you don’t access the data object properties correctly.

The ajax returns an object. Here how you can run tests against it :

- check if the `stream` property is not undefined. If it is, then the account is either closed or doesn’t exists. You can then check the status if you want.

- If the `stream` property is not null, the fun can begin

- `stream.channel.display_name` returns the name of the channel

- `stream.channel.logo` returns the logo of the channel

- `stream.viewers` returns the current number of viewers

You are almost done. My advice is to search to know how is the data object structured. You can use an online json parser to help you see through.

Good luck.

---

<div class="post-metadata">

**Author:** ![abhics21](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/abhics21/32/15891_2.png) [@abhics21](https://forum.freecodecamp.org/u/abhics21)\
**Post date:** [September 9, 2016, 12:19pm UTC](https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112/3 "2016-09-09T12:19:23Z")

</div>

Evntually figured these things myself,it is for the good i guess.  
Thanks for giving such descriptive solution to my messy code.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [January 16, 2021, 5:29am UTC](https://forum.freecodecamp.org/t/need-help-with-twitch-tv-project/35112/4 "2021-01-16T05:29:31Z")

</div>


