Hello all,
I have following data as a JSON in one variable which I am building in one controller. I can access this json data in other controller using factory/service. Now I want to modify this json data as like output json data.
Input Json
[
{
"text":"Identity",
"checked":true,
"timestamp":1435862483093
},
{
"text":"Calendar",
"checked":true,
"timestamp":1435862483443
},
]
Output Json
{
"myname":{
"Facebook":{
"trackdata":[
{
"text":"Identity",
"checked":true,
"timestamp":1435862483093
},
{
"text":"Calendar",
"checked":true,
"timestamp":1435862483443
}
],
"selecteddata":[
{
"text":"Identity",
"checked":true,
"timestamp":1435862483093
},
{
"text":"Calendar",
"checked":true,
"timestamp":1435862483443
}
]
}
}
}
How Can I construct this type of output in angular js ?
Thanks for your time.