On Thu, 6 Nov 2003, JustSome person wrote:

> Hey all,
> 
> 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' => {}
> }
> },
> '1' => {
> '10' => {
> '7' => {}
> }
> },
> '2' => {
> '12' => {}
> }
> },
> '4' => {
> '8' => {
> '11' => {}
> },
> '2' => {
> '12' => {}
> }
> }
> };
> 
> from this I need to generate this JS structure. I've
> tried, but things muck up.
> 
> 
> var jsarray=[
> ['item',
> ['secitem,[
>     ['locitem',[]],
>     ['locitem2',['miscitem']]
>          ]
>  ],
> ['secitem2',[
>     ['locitem',['miscitem']]
>              ]
> ],
> 
> you see? for some reason I can't put put arrays
> withint arrays within arrays with TT...
> 
> any help?

If your original structure was a LoL you could use one of

Data::JavaScript
Data::JavaScript::Anon

and maybe

Data::JavaScript::LiteObject

to build the javscript datastructure for you

Clayton


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to