yes, you are right...I had thought of that...but in some instances we dont' get returned the full hash structure depending on if a hash is populated...your idea is a good one if the data returned is always consistent... I think I found a way to do it. its not pretty, but its working..
basically, I will just use values/keys and tunnel into each hash...and do a bunch of checks and had my JS brackets and commas as needed. I appreciate your idea. thanks --- Mark Mills <[EMAIL PROTECTED]> wrote: > > -----Original Message----- > > From: JustSome person > [mailto:[EMAIL PROTECTED] > > > > thanks, > > but I have to do this the ol' fashion way...within > the > > template itself...to short notice to install, test > a > > new plugin.. > > > > > > > > I have the following map given back from the > app. > > > that > > > > is shown via the USE Dumper; > > > > > > > > $VAR1 = { > > > > '3' => { > > > > '8' => { > > > > '11' => {} > > > > }, > > > > '0' => { > > > > '13' => {}, > > > > '9' => { > > > > '7' => {} > > > > } > > > > }, > > > > > > > > var jsarray=[ > > > > ['item', > > > > ['secitem,[ > > > > ['locitem',[]], > > > > ['locitem2',['miscitem']] > > > > ] > > > > ], > > Maybe I misunderstand this but are you trying to > produce > JavaScript with TT code? > > It seems to me that the Dumper dump of the variable > you had > was awfully close to the output you needed. Is it > possible > that you could simply save the Dump into a variable > and then > use regexp to clean it up and transform it into your > JS? > > It just seems to me that changing braces to > brackets, the > => to a comma and the $VAR1 to your java "var" > declaration > would just about do it. > > Or maybe I'm horribly wrong? :) > > At least that way the only new Plugin you need is > Dumper, > which you are obviously already comfortable with. > > --mark __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree _______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
