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

>   Re: Add and object to an array
>   By: Mortifis to All on Thu Jul 18 2019 17:04:09

>  Mo> var user_list = []; // ??
>  Mo> d = new User(n)
>  Mo> if(u.number == d.number) continue;
>  Mo> if(d.settings&(USER_DELETED|USER_INACTIVE)) continue;
>  Mo> if(u.name == d.name)
>  Mo> {
>  Mo> ... do some stuff and add the values to an array
>  Mo> that can be accessed by the index [x] later on
>  Mo> is there a push.dup_user(user_list) type expression?
>  Mo> }

> user_list.push({
>   number: d.number,
>   alias: d.alias,
>   ...
> });

Thank you ... and to access it later:

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

??



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