Javascript snippet: Find the value of a string key in a multidimensional array or object

This modifies the String prototype to add the functionality we need. Using the string value of the object it runs on as the string key name, this function takes a multidimensional array or object as its parameter, and returns the first value it comes across (it does not continue to search).

1 UPs vs 0 DOWNs

Tags: javascript

Submitted by: briancray Submitted on: Dec 7, 2009

Source:  http://briancray.com/2009/12/07/javascript-find-value-string-key-multidimensional-array-object/

Comments:


This Tut has no comments. Be the first to add your two cents!

Login to post comments.

Popular Tut Tags

TUTlist on twitter

For all the newest TUTs, follow @tutlist

King Tuts

NeilWilston (356 Tuts)
girish (232 Tuts)
kumaraman (203 Tuts)
showkatahmad (160 Tuts)
deepti89 (147 Tuts)

TUTmark

Drag TUTmark to your bookmarks
to begin using our bookmarklet.

Don't know how to use a bookmarklet?
Check out this tutorial.

TUTlist News Feeds

Home Page (RSS and ATOM)
New TUTS (RSS and ATOM)
Subscribe by Email

Advertise HERE!

To learn how to get your ad here.
CONTACT US TODAY!