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:
- N.API.getRooms(function(rooms) {
- for(var i in rooms) {
- console.log('Room ', i, ‘:’, rooms[i].name);
- }
- }, 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!