Can't decide if your JSON is invalid or I have no idea of JSON? Anyways, if you have valid JSON and want to find unique objects from array use the following code:
var optionsList = [{
"optionName": "Cricket",
"optionupdate": "new"
}, {
"optionName": "Cricket",
"optionupdate": "new"
}, {
"optionName": "Football",
"optionupdate": "new"
}, {
"optionName": "Basketball",
"optionupdate": "new"
}, {
"optionName": "Basketball",
"optionupdate": "new"
}, {
"optionName": "Hockey",
"optionupdate": "new"
}];
var tempArray = [],
uniqueValueCollection = [];
$.each(optionsList, function (index, value) {
if ($.inArray(value.optionName, tempArray) === -1) {
tempArray.push(value.optionName);
uniqueValueCollection.push(value);
}
});
var result = JSON.stringify(uniqueValueCollection);
Here the result variable will have unique objects(based on optionName) as a string.
Hope it helps.