I need to access to the values inside the array "position" of this json file using AngularJS. My problem is that I need to get them as text string values, because I need to add them as css class name inside a tag, basically like this:
<div class="europe italy rome"></div>
<div class="europe france paris></div>
<div class="america usa atlanta></div>
This is my Json file:
[
{
"name": "Rome",
"position": ["europe", "italy", "rome"]
},
{
"name": "Paris",
"position": ["europe", "france", "paris"]
},
{
"name": "Rome",
"position": ["america", "usa", "atlanta"]
}
]
I'm not able to figure it out how to do this. Thank you in advance for your suggestions.