How to get nested array element with table.concat()?

How to access nested array element ?
Here is my code block
{
nome = “McDold’s”,
categoria = “Lancnete”,
fotos = {“img_photo13.jpg”},
latitude = -22.903501,
longitude = -43.178534,
endereco = “Av. Rio Branco, 100 - Centro\nRio de Janeiro-RJ”,
description = “O McDonald’ pão com gergelim. Para a sobremesa, há tortas de maçã ou banana, sorvetes diversos e milk shakes.”,
promo_list = {

{promo = “20% de desconto no BigMac”, valid = “Valido até 17/10/2013”}
},

}

I am getting problem in while fetching promo_list ={} value
I am printing promo_list element as below

print(“This is product_list”,table.concat(promo_list))

But its throwing error as
attempt to call global ‘promo_list’ (a nil value)

So please guide me
Thanks

promo_list is in another table right? The way you setup your code it implies it resides in another table. In which case you should do 

print(“This is product_list”,table.concat(theNameOfMotherTable.promo_list))

Here I am using below code

for i=1, #product_list do

        --print("Inserindo ",  product_list[i].nome)

        --options = { title=product_list[i].nome, subtitle=product_list[i].categoria }

   

    print(“This is product_list”,table.concat(product_list[i].promo_list(promo_list.promo)));

end

I am getting error while accessing “promo” which is in promo_list

What is product_list[i].promo_list(promo_list.promo)? Why are you putting promo_list.promo inside promo_list? I don’t understand what that is supposed to do.

Is it not just  print(“This is product_list”,table.concat(product_list[i].promo_list)); ?

If it still doesn’t work, simplify your code and put it into separate project. Get rid of everything that has no meaning. Present your problem so it is reproducible and clean.

product_list is 

local product_list

product_list = event.params.myVar

and i am putting promo inside promo_list because its inside the promo_list , as below

{
nome = “McDold’s”, 
categoria = “Lancnete”,
fotos = {“img_photo13.jpg”}, 
latitude = -22.903501,
longitude = -43.178534,
endereco = “Av. Rio Branco, 100 - Centro\nRio de Janeiro-RJ”,
description = “O McDonald’ pão com gergelim. Para a sobremesa, há tortas de maçã ou banana, sorvetes diversos e milk shakes.”,
promo_list = {

{ promo = “20% de desconto no BigMac”, valid = “Valido até 17/10/2013” }
},

promo_list is in another table right? The way you setup your code it implies it resides in another table. In which case you should do 

print(“This is product_list”,table.concat(theNameOfMotherTable.promo_list))

Here I am using below code

for i=1, #product_list do

        --print("Inserindo ",  product_list[i].nome)

        --options = { title=product_list[i].nome, subtitle=product_list[i].categoria }

   

    print(“This is product_list”,table.concat(product_list[i].promo_list(promo_list.promo)));

end

I am getting error while accessing “promo” which is in promo_list

What is product_list[i].promo_list(promo_list.promo)? Why are you putting promo_list.promo inside promo_list? I don’t understand what that is supposed to do.

Is it not just  print(“This is product_list”,table.concat(product_list[i].promo_list)); ?

If it still doesn’t work, simplify your code and put it into separate project. Get rid of everything that has no meaning. Present your problem so it is reproducible and clean.

product_list is 

local product_list

product_list = event.params.myVar

and i am putting promo inside promo_list because its inside the promo_list , as below

{
nome = “McDold’s”, 
categoria = “Lancnete”,
fotos = {“img_photo13.jpg”}, 
latitude = -22.903501,
longitude = -43.178534,
endereco = “Av. Rio Branco, 100 - Centro\nRio de Janeiro-RJ”,
description = “O McDonald’ pão com gergelim. Para a sobremesa, há tortas de maçã ou banana, sorvetes diversos e milk shakes.”,
promo_list = {

{ promo = “20% de desconto no BigMac”, valid = “Valido até 17/10/2013” }
},