my question is somewhat similar to javascript | Object grouping .
my input obj is
[
{
"name":"Display",
"group":"Technical detals",
"id":"60",
"value":"4"
},
{
"name":"Manufacturer",
"group":"Manufacturer",
"id":"58",
"value":"Apple"
},
{
"name":"OS",
"group":"Technical detals",
"id":"37",
"value":"Apple iOS"
}
]
and my required output is
[
{
"name":"Display",
"group":"Technical detals",
"id":"60",
"value":"4"
},
{
"name":"OS",
"group":"Technical detals",
"id":"37",
"value":"Apple iOS"
},
{
"name":"Manufacturer",
"group":"Manufacturer",
"id":"58",
"value":"Apple"
}
]
when i tried to implement the answer ,i got
[[[object Object] {
group: "Technical detals",
id: "60",
name: "Display",
value: "4"
}, [object Object] {
group: "Technical detals",
id: "37",
name: "OS",
value: "Apple iOS"
}], [[object Object] {
group: "Manufacturer",
id: "58",
name: "Manufacturer",
value: "Apple"
}]]
i don't want to group my objects with same property into a single array . i couldn't find out where they are pushing it into array. help me to Fix it :(
See Question&Answers more detail:
os