adasdasd adasdasd - 1 year ago 76
Javascript Question

Access multiple arrays from JSON using AngularJS

This is my function to fetch the array.

$scope.getclinicofuser = function()
var dataParameter = {

url: "/cms/api/user/getUserClinic",
method: "POST",
headers :{'Content-Type': 'application/json','Accept': 'application/json' },
data: dataParameter
}) .success(function(response) {

$scope.DomainName = response;


Here is the api call response

"clinicNames": [2]
0: {
"clinicName": "testing"
"DomainName": ""
"primaryEmailId": ""
1: {
"clinicName": "test-clinic"
"DomainName": ""
"primaryEmailId": ""
"status_code": "success"

My html tag

<li ng-repeat="response in DomainName">{{root.clinicNames}}</li>

Now what i want to do is to display BOTH DomainName in HTML i had a hussel with HTML ng-repeat tags but still no clues what i am doing wrong

Answer Source


<li ng-repeat="response in DomainName.clinicNames track by $index">{{response.DomainName}}</li>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download