[NFBCS] JavaScript Converting Keys and Values into a Variable

dan.tevelde at comcast.net dan.tevelde at comcast.net
Thu Mar 3 17:59:44 UTC 2022


Hi Aaron,

Thanks for your offer of help. I got my questions answered.

Dan

-----Original Message-----
From: Aaron Cannon <cannona at fireantproductions.com> 
Sent: Wednesday, March 2, 2022 6:21 PM
To: NFB in Computer Science Mailing List <nfbcs at nfbnet.org>
Cc: dan.tevelde at comcast.net
Subject: Re: [NFBCS] JavaScript Converting Keys and Values into a Variable

I am confused by your description. Do you by chance have sample input and sample output data? That would probably be a lot easier to follow.

Aaron

--
This message was sent from a mobile device


> On Mar 2, 2022, at 13:28, dan TeVelde via NFBCS <nfbcs at nfbnet.org> wrote:
> 
> I am studying JavaScript and need to convert an array of nested 
> objects into a new array which is not nested. The input object is 
> defined as a nested array in a global variable with keys and values. 
> The outer array is a list of students. For each student there is an 
> inner array containing the days of the week with Boolean arguments 
> true or false. I need to create a new array containing the list of 
> students for a given day. The day is passed as an argument into a 
> function. Is there a way I can convert the object keys and values into 
> a Variable with placeholder text for the names of the students and 
> days of the week. I could use the object.keys and the Object.values 
> methods but I'm not sure if I can compare the keys to the argument in 
> the function. Since the object is defined in a global variable I don't actually know the names of the keys.
> 
> 
> 
> Thanks,
> 
> Dan
> 
> _______________________________________________
> NFBCS mailing list
> NFBCS at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
> To unsubscribe, change your list options or get your account info for NFBCS:
> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/cannona%40fireantpr
> oductions.com




More information about the NFBCS mailing list