AnsweredAssumed Answered

How to combined multiple Json records

Question asked by c-nagamani_kummari715285 on Aug 22, 2017
Latest reply on Aug 23, 2017 by aaron.de.rybel821561

  {
"Id" : 20,
"ListId" : 1,
"Name" : "Alpha",
"Title" : "Testing",
"Details" : [
{
"date" : "2017-01-06",
"toDate" : "2017-01-08",
"XX" : "REG",
"VV" : 35,
"SS" : 1,
"ww" : 10,
"ee" : 0,
"real" : [
{
"id" : 5405,
"rr" : false,
"ww" : false,
"rr" : false,
"er" : 6
},
]
}
]
},
{
"Id" : 20,
"ListId" : 1,
"Name" : "Alpha",
"Title" : "Testing",
"Details" : [
{
"date" : "2017-01-06",
"toDate" : "2017-01-08",
"XX" : "REG",
"VV" : 35,
"SS" : 1,
"ww" : 10,
"ee" : 0,
"real" : [
{
"id" : 5405,
"rr" : false,
"ww" : false,
"rr" : false,
"er" : 6
},

]
}
]
}

 

WIth same Id's getting multiple records.Any idea to combined the records to single .

 

Expected Json:

 

{
"Id" : 20,
"ListId" : 1,
"Name" : "Alpha",
"Title" : "Testing",
"Details" : [
{
"date" : "2017-01-06",
"toDate" : "2017-01-08",
"XX" : "REG",
"VV" : 35,
"SS" : 1,
"ww" : 10,
"ee" : 0,
"real" : [
{
"id" : 5405,
"rr" : false,
"ww" : false,
"rr" : false,
"er" : 6
},
]
},
{
"date" : "2017-01-06",
"toDate" : "2017-01-08",
"XX" : "REG",
"VV" : 35,
"SS" : 1,
"ww" : 10,
"ee" : 0,
"real" : [
{
"id" : 5405,
"rr" : false,
"ww" : false,
"rr" : false,
"er" : 6
},

]
}
]
}

Outcomes