I have this controller.php
$repository = $this->getDoctrine()->getManager()->getRepository('TechappStatsBundle:ParentForm');
$data = $repository->findBy(array(),array('id' => 'desc'),1,0);
$formulaire = new ParentForm();
$parent= $this->get('form.factory')->create(new ParentFormType(),$formulaire);
if ($parent->handleRequest($request)->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($formulaire);
$em->flush();
}
return $this->render('TechappStatsBundle:Stats:index.html.twig',array("res" => $data,
"parentform"=>$parent->createView(),));
I want to check the variable res
in my view with js if it is equals to a specific value or not but I don't know how to pass it.