<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hello together,<div>I am still new to Extbase Development, but I am slowly proceeding, I even managed to get an AJAX call in my Extension, so I can output some stuff dynamically.</div><div>However, to make this useful, I would like to read out some fields from my database and comfortably put them in an array and encode it in JSON. I managed to do the JSON encoding with random values in an array,&nbsp;</div><div><br></div><div><div>$arr = array ('a'=&gt;1,'b'=&gt;2,'c'=&gt;3,'d'=&gt;4,'e'=&gt;5);</div><div><span style="font-size: 10pt; ">return json_encode($arr);</span></div></div><div><br></div><div>but I don't seem to understand how to use the repository correctly for some output. I'm not talking about the Fluid View here, I'd rather not use it here.</div><div><br></div><div>So what I basically tried was</div><div><br></div><div>$myarray = $this-&gt;raceRepository-&gt;findAll();</div><div>print_r($myarray);</div><div><br></div><div>I just wanted any output (that's why I used print_r), but I got a lot more than what I wanted, including some error message like</div><div>"You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_QueryResult. To retrieve the first result, you can use the getFirst() method."</div><div><br></div><div>I don't even know where to start, that might be my biggest problem here. Can I somehow use the getMethods I declared in the Model?</div><div><br></div><div>Hope you can help me :)</div><div><br></div><div>Regards,</div><div>Zahl</div>                                               </div></body>
</html>