[NFBCS] JavaScript Converting Keys and Values into a Variable

Aaron Cannon cannona at fireantproductions.com
Thu Mar 3 00:20:31 UTC 2022


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%40fireantproductions.com



More information about the NFBCS mailing list