---
title: "JsonView doesn't assign descendant objects"
url: "https://www.typo3.net/d/121355-jsonview-doesnt-assign-descendant-objects"
source: "typo3.net"
tags: ["Extensions","Extbase","English","Frage","JavaScript & AJAX"]
created: "2015-11-24"
last_reply: "2015-11-25"
replies: 1
solved: false
page: 1
pages: 1
lang: "en"
---

# JsonView doesn't assign descendant objects

Extensions › Extbase · 1 Antwort · gestartet 2015-11-24

## Eröffnungsbeitrag

**majermi3** · 2015-11-24 · [Beitrag #1](https://www.typo3.net/d/121355-jsonview-doesnt-assign-descendant-objects/1)

Hi all,

I am having trouble using JsonView in TYPO3. Problem is that I don't get descendant objects of my "Camera" object.

```php
public function listAction() {
	$this->view->setVariablesToRender(array('cameras'));
	$this->view->setConfiguration(array(
		'cameras' => array(
			'_descend' => array(
				'sensor' => array(
					'_descendAll' => array(
					)
				)
			)
		)
	));
	$this->view->assign('cameras', $this->cameraRepository->findAll());
}
```

Model looks like this:
Camera - title, sensor, type, provider
Sensor - title
Provider - title

In my json I want to get also sensor and provider for every listed camera. All I get is a title and type (simple strings).

Any idea what I am doing wrong?

Thanks.

## Antworten

### [#2](https://www.typo3.net/d/121355-jsonview-doesnt-assign-descendant-objects/2) · majermi3 · 2015-11-25

So i found the solution.

correct configuration is:

```php
$this->view->setConfiguration(array(
	'cameras' => array(
		'_descendAll' => array(
			'_descend' => array(
				'sensor' => array()
			)
		)
	)
));
```

---

Quelle: „JsonView doesn't assign descendant objects“, typo3.net, https://www.typo3.net/d/121355-jsonview-doesnt-assign-descendant-objects
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
