angularjs - how to get object in an array with index in a controller angular js -


i need object in array given index in angular js.

scope.storelist = [{   'id':101,   'name':indhu },{   'id':102,   'name':selvin },{   'id':103,   'name':indhu1 }]; 

in if give index value, should give object. tried below code not get:

var list = scope.storelist[2]; 

please 1 it.

name values should in string type.

$scope.storelist = [{   'id':101,   'name':"indhu" },{   'id':102,   'name':"selvin" },{   'id':103,   'name':"indhu1" }];  console.log("",$scope.storelist[2]) 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -