Reference to deeply nested value

How to refer to a node several levels deeper as stated below?
(there are more state types for the stategroups, but to keep it short)

root {
	'Calculations': collection ['Calculation'] {
		'prijs opbouw': stategroup (
			'prijs verpakking' {
				'select': stategroup (
					'gewicht' {
						'prijs verpakking': number 'kg_e'
						'aantal kg': number positive 'kg'
						'prijs/kg': number 'kg_€' = division ( .'prijs verpakking' as 'kg_e' , .'aantal kg' )
						'prijs/kg': number 'art€' = from 'kg_€' .'inkoopprijs'
					}
				)
			}
			'prijs artikel' {
				'select': stategroup (
					'meter prijs' {
						'meterprijs': number 'm1_e'
						'lengte': number 'mm'
						'mtr(mm1)': number 'mm1' = from 'mm' .'lengte'
						'meter': number 'm1' = from 'mm1' .'mtr(mm1)'
						'inkoopprijs': number 'm1_v' = product ( .'meterprijs' as 'm1_e' , .'mtr(mm1)' )
						'artikelprijs': number 'art€' = from 'm1_v' .'inkoopprijs'
					}
				)
			}
		)
		'Aantal Artikelen': number 'aantal'
		'InkoopExclBTW': number positive 'inkoop€' = product ( .'artikelprijs' as 'art€' , .'Aantal Artikelen' )
	}
}
numerical-types
	'art€'
		= 'm1_v' * 1 * 10 ^ -3
		= 'kg_v' * 1 * 10 ^ 0
		@numerical-type: (
			label: “€”
			decimals: 2
		)
	'kg_v'
		= 'kg_e' / 'kg'
	'kg_e'
	'kg'
	'aantal'
	'inkoop€'

Error: 'property' artikelprijs was not found in 'attributes'.

The artikelprijs is only available for .'prijs opbouw'?'prijs artikel'.'select'?'meter prijs'. You need to handle other possible cases as well. For that you use a switch statement:

= switch .'prijs opbouw' (
	|'prijs verpakking' => ...
	|'prijs artikel' as $'art' => switch $'art'.'select' (
		|'meter prijs' as $'mp' => product ( $'mp'.'artikelprijs' as 'art€' , .'Aantal Artikelen' )
	)
)	

In the docs you can find more examples of switch statements.