Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Can you give an example of returning entries from a section in JSON format using a custom query?
$query = craft()->elements->getCriteria(ElementType::Entry);
$query->section = 'mySection';
$results = $query->find();
You can obviously refine the query before calling find():
$query->limit = null;
$query->myCustomField = 'value';
Required, but never shown