Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Find on a nested structure

From: sanghabum:aol at: 11-Apr-2001 12:30

Can you guys help me on this one? I've got a structure like this: MyStructure: [ [key1 data1] [key2 data2] [key3 data3] ... ] where each Key is a single string, but the Data is another block. Example: MyStructure: [ ["US" ["USA" "English" "Spanish"] ] ["DE" ["Germany" "German"] ] ["NZ" ["New Zealand" "English"] ] ] I can't find any way to use Find to find me a given key:
>> find MyStructure "US"
== none
>> find MyStructure ["US"]
== none Is there something I can do with Find? I don't want to change the structure to MyStructure: [ key1 [data1] key2 [data2] key3 [data3] ... ] which is Find-able, but isn't SORT-able,--or at least not by me. Thanks, Colin.