How can I extract certain tag, for example img when parsing JSON in AngularJS? I have a JSON file with following data:
jsonFeed({
"title": "My Blog",
"items": [
{
"title": "Title1",
"description": "<p><a href=\"#">Paul<\/a> posted a photo:<\/p><img src=\"https://farm8.staticflickr.com/7365/26872407641_cfbb210ee7_m.jpg\"/>"
},
{
"title": "Title2",
"description": "<p><a href=\"#">Beth<\/a> posted a photo:<\/p><img src=\"https://farm8.staticflickr.com/7287/26333398074_cfbce73532_m.jpg\"/>"
}
]
});
I need to get that image in description for every post:
<article ng-repeat="post in posts">
<h1>{{ post.title }}</h1>
<img src=""/>
</article>
Is there way to do that in angularjs or is it better to use jQuery?