Subj : Re: Add and object to an array
To   : echicken
From : Mortifis
Date : Thu Jul 18 2019 06:30 pm

>   Re: Re: Add and object to an array
>   By: Mortifis to echicken on Thu Jul 18 2019 17:40:34

>  Mo> for (var i = 0; i < user_list.length; i++) {
>  Mo> print(user_list[i]+"\r\n");
>  Mo> }

> Then you'd get a whole bunch of [object Object] output or something similar
> (you're trying
> to print each array element, as a string, but they're objects).  Something
> like this:

>   print(user_list[i].alias + '\r\n');

> or this:

>   print(JSON.stringify(user_list[i]));

> or this, without the for loop:

>   print(JSON.stringify(user_list));

excellent, thank you.  And, yes, that's what I was getting [object Object] I
tried a bunch of methods I researched but none of them worked.  still not sure
how to get console.log() to work, says undefined.




My teachers always said "You can't make a living looking out a window!", they
were wrong,  I drive truck :-P

---
� Synchronet � AlleyCat! BBS - http://alleycat.synchro.net:81