How can I merge these two JTokens into one single JToken. This sounds like it should be simple, but can\'t get my way around it.
{
\"data\":[
{
\"I
You could merge it like that (or if you had it had it in an array or list you could make a linq group by query for example over the ID property, that would be likewise effective).
var data1 = JObject.Parse(@"{
'data':[
{
'ID':'53a1862000404a304942546b35519ba3',
'name':'Private Approval Process: Draft Document CPL',
'objCode':'ARVPTH'
}]
}");
var data2 = JObject.Parse(@"{
'data':[
{
'ID':'53a1862000404a304942546b35519ba3',
'name':'Private Approval Process: Draft Document CPL',
'objCode':'ARVPTH'
}]
}");
data1.Merge(data2, new JsonMergeSettings
{
MergeArrayHandling = MergeArrayHandling.Union
});
string json = data1.ToString();