Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Fetching json by node index

$
0
0

hi , i have problem fetching data in json by index
{
" Quartier: x": {
"Pharmacie du midi": {
"adresse": "10, rue d' El Jadida (anc. médina) ",
"tel": "522220666"
}
},
" Quartier: z": {
"Pharmacie Fouarat": {
"adresse": "193, bd du Fouarat, hay Adil ",
"tel": "522601483"
},
"Pharmacie Syrie": {
"adresse": "42, rue Amyot d'Inville, hay Arsalane ",
"tel": "522613838"
}
},
" Quartier: y": {
"Pharmacie Achourouk": {
"adresse": "quartier Beausite, 06 n°1 EQ8, Addoha I ",
"tel": "522673667"
}
}
}

my app.js
`.controller('pharmacie', function($scope, $http) {
$http.get('aaa.json').then(function(resp) {

$scope.liste=resp.data;
console.log($scope.liste);
// For JSON responses, res5p.data contains the result
})
})
i want make a ng repeat list of the parent node exemple
list 1: Quartier: x
list 2: Quartier: z
list 3 : Quartier: y
and how access childs by index
i tried :
<ion-item ng-repeat="departement in liste" >{{departement[0]}}</ion-item>`
but its not working , eny help will be appreciated


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>