I have two dynamic variable on my templates and I want use a dynamic within another dynamic variable on angular.for clear what I want I write down a snippet to clear my aim :
My Goal results of this snippet should be "John Doe", my question is ** how can I use a variable within another variable in angular ? is there any way to achieve this?
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<body>
<div ng-app="" ng-init="person={firstName:'John',var:'Doe'};dynamic='var'">
<p>The name is {{ person.{{dynamic}} }}</p>
</div>
</body>
</html>