Get unique values from json using jquery
Consider Following is the example file of JSON. [ { "category": "Movie", "type": "English" }, { "category": "Movie", "type": "Hindi" }, { "category": "Movie", "type": "teulgu" }, { "category": "games", "type": "Cricket" }, { "category": "games", "type": "chess" }, { "category": "games", "type": "Cricket" }, { "category": "games", "type": "chess" }, { "category": "hobbies", "type": "chating" }, { "category": "hobbies", "type": "singing" }, { "category": "hobbies", "type": "chating" }, { "category": "hobbies", "type": "singing" } ]Save this file as mydata.js.. Next write the following logic in between the script tags Here is the logic
That's it..Following is the output you will getDisplay Unique Records
Before Logic After Logic
Labels: .Net Tutorials, Aspnet, C#, CSharp, HTML5, JQuery, Xml
<< Home