I have a nested array that I am passing as templateVar.
setTemplateVars(['details' => $ arr])
The array($ arr) is
 => [ ["key1"]=>value1 ["key2]=>value2 ] =>[ ["key1"]=>value1 ["key2]=>value2 ] . . . All arrays have same keys.
I have tried both updates mentioned in How to show array in email template file?
I cannot pass it as a string as the array can be an array of 100s of arrays with same keys.