質問

I'm new to BrightScript and am trying to figure out how to work with their associative arrays. My questions is, can an associative array in BrightScript hold another array as a value?

I'm trying to parse an associative array that looks like this:

showList = {Romance: 
        [
            {
                Title: "The Notebook",
                releaseDate: "2000"
            }
        ], 

    Comedy:
        [
            {
                Title: "Caddyshack",
                releaseDate: "1976"
            }
        ]
     }

If I use a statement like this:

return showlist["Comedy"]

Will this only return an array containing my Comedy video meta-data?

It seems like this should work, but I've been having trouble implementing this. Any suggestions?

Thanks!

役に立ちましたか?

解決

Yes, showList["Comedy"] or showList.comedy give you

[ { Title: "Caddyshack", releaseDate: "1976" } ]
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top