JSFiddle - React, Tailwind, and code Playground
JavaScript
var subservices = [{
"Id": "hello",
"order": "world"
}, {
"Id": "abc",
"order": "xyz"
}, {
"Id": "hello1",
"order": "world"
}];
var result = [];
$.each(subservices, function (i, e) {
var matchingItems = $.grep(result, function (item) {
return item.order === e.order;
});
if (matchingItems.length === 0) result.push(e);
});
alert(JSON.stringify(result));