> Most likely I missed something, because doesn't
> structFindKey return a value as well as the path
> to the key? Unless you're talking about getting
> the "path" to another key, not the one
> you just found.?
The native function only works on the keys of an individual structure.
The issue Bruce is dealing with is that he's got nested structures, so
he's looking for a way to navigate the path from the top to a nested
structure. For example:
struct [
[cat]
[dog]
[bird]
]
This structure would only need ColdFusion native struct functions like
StructFindKey.
struct [
[cat[
[large[
[lion]
[tiger]
[jaguar]
]]
]]
]
This nested structure would require a more elaborate solution in order
to fetch "jaguar" from the top. What bruce has is a string
representing the path from the top to "jaquar", i.e. his string
contains the value "struct.cat.large.jaguar", at which point he can
either use evaluate(string) to return the jaguar variable, or he would
need to find a more elaborate solution, because even if he removes
"struct" from the beginning of the string,
structKeyFind(struct,string) won't find "cat" within "struct" (or
"cat.large.jaquar" because the structure doesn't contain a
"cat.large.jaguar" key, it contains a "cat" key).
s. isaac dealey 434.293.6201
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237851
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54