I've got an array of objects being set to the Mustache render function:
require 'vendor/Mustache/Autoloader.php';
Mustache_Autoloader::register();
$m = new Mustache_Engine();
echo $m->render($template, $data);
$data contains an array of objects, like this:
(This is a screenshot from http://www.jsoneditoronline.org and I've opened one of the objects for your information)
Now in my $template code I have this:
{{#.}}
<article>
<h1>
<a href="layouts_post.html">{{name}}</a>
</h1>
<p>{{{text}}}</p>
<h2>{{jobtitle}}</h2>
</article>
{{/.}}
The iteration isn't working and I'm wondering if there is a way for Mustache to iterate through an array of objects as above.
(FYI - I've tried rebuilding my data, but without success. each time Mustache is not able to iterate.)
Many thanks for help in advance.