Documentation of GetRooms has an error (example code)

Yesterday, starting to learn the API (Server) from your web (
http://lynckia.com/licode/server-api.html), i have found that this code
isn’t working:

  1. N.API.getRooms(function(rooms) {
  2. for(var i in rooms) {
  3. console.log('Room ', i, ‘:’, rooms[i].name);
  4. }
  5. }, errorCallback);

As you can see, I think it needs a “JSON.parse(rooms)” to deserialise the
array of rooms, and make the code works. At least, without the
"JSON.parse", it hasn’t worked in my testing.

Bye bye!

Hi Jordi,

Yes, you are absolutely right. It’s OK now, thank you very much!