JSON array I am getting after get API call, I am getting following json response.
{
"reactions":[{
"severity":{
"label":"Severe"
},
"label":"Skin Rash"
}],
"audit":{
"source":"medicare",
"createDate":"2015-03-02T18:39:23Z",
"update??Date":"2015-03-02T18:39:23Z",
"version":"1"
},
"label":"Other - IODINE",
"ended":"2007-10-28T00:00:00-04:00",
"started":"1993-01-01T00:00:00-05:00??",
"date":"2015-03-02T18:37:42Z"
}".
And I need to just display only
":[{"severity":{"label":"Severe"},"label":"Skin Rash"}]"
in li tag.
How can I do that ?
I need to populate this json array in <li>
in html5. How can I do it? I am using restangular.:
Angular JS file:
Restangular.one('APIName', Parameter_to_api).get().then(function (result) {
$scope.datalist= result;
}
HTML file
<ul class="links">
<li ng-repeat="data in datalist"></li>
</ul>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…