Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32176

Re: traverse a complex object and find value

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 <PointedEars@web.de>
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> (permalink)
References <aea7f57c-56e8-4fe3-9804-68eacec8f7d8@googlegroups.com> <object-traversal-20170112180818@ram.dialup.fu-berlin.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
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+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Cancel-Lock sha1:FNj6Yb3hjo+dmfR8/zZEPPXya6M=
Xref csiph.com comp.lang.javascript:32176

Show key headers only | View raw


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


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