Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32176
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: traverse a complex object and find value |
| Date | 2017-01-13 21:48 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <4346283.0VBMTVartN@PointedEars.de> (permalink) |
| References | <aea7f57c-56e8-4fe3-9804-68eacec8f7d8@googlegroups.com> <object-traversal-20170112180818@ram.dialup.fu-berlin.de> |
Stefan Ram wrote: > jykl608@gmail.com writes: >> I want to find the value of "temp" inside the "main" >> property, but I am not sure how. > > My program »UFilter« shows how to recursively traverse an > object. > > It prints the contents of the global object. It was only > tested under a recent Firefox. IOW, not tested at all. > I think you can add your search into the loop starting with > »Object.getOwnPropertyNames( arg ).forEach« and then strip > the program from the parts you don't need (like the output > of the object). > > [a character desert, as usual] Priding yourself to be an educator, I have a hard time understanding why you would continue to write source code in a way that does not follow any widely accepted code style, and in general in a way that is very difficult to read. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
traverse a complex object and find value jykl608@gmail.com - 2017-01-11 22:51 -0800 Re: traverse a complex object and find value "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-12 09:36 +0100 Re: traverse a complex object and find value Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-12 12:42 +0000 Re: traverse a complex object and find value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-13 21:48 +0100
csiph-web