Possible Duplicate:
Get unique results from JSON array using jQuery
I have created JSON for sports which looks like
[
{
"sportName": "Men's Basketball",
"path": "mbasket",
"sportID": 7,
"parentSportName": "Basketball"
},
{
"sportName": "Women's BasketBall",
"path": "wcc",
"sportID": 8,
"parentSportName": "Basketball"
},
{
"sportName": "Women's Cross Country",
"path": "wbasket",
"sportID": 9,
"parentSportName": "Cross Country"
},
{
"sportName": "Men's Cross Country",
"path": "mcc",
"sportID": 10,
"parentSportName": "Cross Country"
}
]
I want to fetch unique parentSportName using jQuery, but what I wanted to know if my JSON structure is correct or I need to do some modifications. I need to re fetch the values as am creating nested list and my SLOC is increasing.