Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48981

Is there a way to group object fields in Angular?

$
0
0

I am looking at creating a list with my JSON object and grouping some fields together that have the same title.

[{
    "state": "Illinois",
    "country": "USA"
}, {
    "state": "Florida",
    "country": "USA"
}, {
    "state": "Ontario",
    "country": "Canada"
}]

I’d like to be able to display the list like this:

-USA
--Florida
--Illinois
-Canada
--Ontario

Do I need to create a custom pipe for this or just filter the items a particular way?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 48981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>