Assign array variable in smarty template

Hi,
How to assign array values in smarty tpl file
Ex. [{assign var=‘test’ value=[‘test’ => ‘1’, ‘text’=>‘2’]}]

Can you please give me solution.

Thanks in advance.

for assoc array you will have to use json_decode