How to show information the right information from Json file


#1

This is Json file:

[{"id":"1","name":"Cemera","catename":"canon","filepath":"/img/jdf.png"},{"id":"1","name":"Cemera","catename":"canon","filepath":"/img/sdsd.jpg"}]

This code :smile:

<ion-view>
	<ion-content>
		<ion-list class="list-inset">
			<ion-item class="item-text-wrap" ng-repeat="x in articledetail ">
			  <p> Name : {{x.name}}</p>
              
                <p>  Category : {{x.catename}}</p>
                 <p>  Filepath : {{x.filepath}}</p>
</ion-item>
		</ion-list>
	</ion-content>
</ion-view> 

i want to show like this:

Name: Cemera
Category : canon
Filepath : /img/jdf.png
             /img/sdsd.jpg

#2

then you have to prefilter your data --> merge together the information
[{ catname: “canon”, name: “Cemera”, filepaths: [“img/…”, “img/…”]}]

Or you add a custom angularjs filter for that, to call it after your ngrepeat
https://docs.angularjs.org/api/ng/filter/filter

But it is fast to do it directly if you get the data.