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


Groups > comp.lang.javascript > #28539

Re: How to solve this ?

From Martin Honnen <mahotrash@yahoo.de>
Newsgroups comp.lang.javascript
Subject Re: How to solve this ?
Date 2015-08-19 11:29 +0200
Organization Liberty Development
Message-ID <mr1i9h$22i$1@adenine.netfront.net> (permalink)
References <ed7fa790-443f-4e27-8bca-0d9f194dc36a@googlegroups.com>

Show all headers | View raw


Ajinkya Joshi wrote:
> Write a javascript function, findPath(obj, str), that takes a javascript object and a string parameter and iterates through the object and returns the path to the key that contains the string as a value (using '.' as a separator). For example:
>
> var obj = { bat: bee, bird: plane, bee : { foo : bar, test : { text: needle } } };

Should needle be a string literal 'needle'? Or is that another variable 
defined elsewhere?




--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to solve this ? Ajinkya Joshi <ajinkya.joshi.d@gmail.com> - 2015-08-19 00:19 -0700
  Re: How to solve this ? Martin Honnen <mahotrash@yahoo.de> - 2015-08-19 11:29 +0200
  Re: How to solve this ? Denis McMahon <denismfmcmahon@gmail.com> - 2015-08-19 17:02 +0000
    Re: How to solve this ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-08-19 19:26 +0200

csiph-web