members in array, is there a way to access with brackets?

Hello, is there a way to access the below with square brackets [] ?

local a = { { test = "hello world" } } print( a[1].test, a[1][test] )

The result will print as:

hello world          nil

Is there a way to make a[1][test] work? Is my syntax wrong?

a[test]

[lua]

print (a[1][“test”])

[/lua]

a[“test”]

Nicks correct I missed the extra{}

Oh! I get it now. Thanks for the help!

a[test]

[lua]

print (a[1][“test”])

[/lua]

a[“test”]

Nicks correct I missed the extra{}

Oh! I get it now. Thanks for the help!