It looks to me that .type inside the test condition is treated as an object instead of a String. But I need to compare the value of type inside the loop. Anybody please help to solve my problem. Thanks.
If the value equals "Normal" then the value also is not null.
Looks like it's working as it should be, but your code is incorrect.
Joined: Feb 01, 2008
Thanks for your reply, David.
The value does equal "Normal". However, ".type != null" returns true but ".type == 'Normal'" returns false and thus the "HereTest123" never got printed out. So I only thought that probrably .type is an object type and can't compare to a string.
I also tried this:
But never got into "do something here..." statement. Any ideas? Thanks again.
I don't know what to tell you--either the data isn't as you expected, or something else in on the stack. There's no reason to use the  notation inside an iterator; either access the property directly, or put each object of iteration into a var and access it through that. The notation and tag works fine; it's used all the time.