This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Array Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Array" Watch "Array" New topic
Author

Array

Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
Hi,

I have php array like this

Array
(
[0] => stdClass Object
(
[Name] => abc
[Filter] => any
)

[1] => stdClass Object
(
[Name] => xyz
[Filter] => clean
)
)

I have assigned this array to javascript object . Now I want to iterate through javascript array.

I want to retrieve value of Filter from the array by comparing name with some value.

I dont know how to iterate over such array.

Please help.

Thanks


~ Anand,
SCJP 1.5
SCWCD 1.5
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

I cannot tell from your example what the structure of the array is. Could you do better?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Array
 
Similar Threads
After upgrading from 2.0.x to 2.2.x, static content no longer loads
Dropdown populates other fields
how i get selected list data
access variable of a s:select (struts2)
Iterating over Map using JSTL