2203Iterating hash result in VB/COM client
- Dec 21, 2002In an attempt to give my customers a flexibility to access my Web
Services, I tried to use COM object (with Lite.dll) so that they can
write their own client app in VB/C#/C++ etc.
The Web Services returns a complex data type (nested hashes) so I
need to be able to iterate them. For example, below is a piece of
code taken from hashecho.vbs VB sample file.
Set soaplite = CreateObject("SOAP.Lite")
Set subhash = soaplite.hash("key_c", "Value C")
Set hash = soaplite.hash("key_a", "Value A", "key_b", subhash)
hash.key_b.key_d = "Value D"
How do I iterate all the keys in variable 'hash'?
Essentially, what I want to do is similar to what Perl code below is
foreach $val ( keys %$hash )
print $val . "\n";