Subj : Add and object to an array
To : All
From : Mortifis
Date : Thu Jul 18 2019 05:04 pm
Trying to do a list type array that is a list of objects. ie
const dup_user = {
number: '',
alias: '',
num: '',
email: '',
dup_alias: '',
dup_num: '',
dup_email: ''
}
var user_list = []; // ??
I'd like to populate by running a nested loop that compares users names:
lastuser=system.lastuser;
for(i=1; i<=lastuser; i++) // loop through users and grab the name
{
u = new User(i);
if(u.settings&(USER_DELETED|USER_INACTIVE))
continue;
// start new new loop and compare name
for(n = i+1; n <= lastuser; n++)
{
d = new User(n)
if(u.number == d.number) continue;
if(d.settings&(USER_DELETED|USER_INACTIVE)) continue;
if(u.name == d.name)
{
... do some stuff and add the values to an array
that can be accessed by the index [x] later on
is there a push.dup_user(user_list) type expression?
}
}
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