Path: csiph.com!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: traverse a complex object and find value Date: Fri, 13 Jan 2017 21:48:50 +0100 Organization: PointedEars Software (PES) Lines: 30 Message-ID: <4346283.0VBMTVartN@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1484340532 11521 eJwFwQkBwDAIA0BLBBoeObQM/xJ2R3P4i+P0w+VGl2ZkiZje9sXYKD+Zq/4ARLGnYIBO7soPBxIQZQ== (13 Jan 2017 20:48:52 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 13 Jan 2017 20:48:52 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBwDAIA0BLlBKgcngW/xJ2h+vHJ8zhBoJpM/qGyuZFm3A9rUND+RZHEvFMsu6ay7f9nazY9IJ0l/5XcBWX X-NNTP-Posting-Host: eJwFwYEBwDAEBMCVqHiMIx/2H6F3blAwDhzH11fsztBzAzfYLIPoN1oVUnh8w2wtmxTptP0BJEsRPA== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. 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: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.