iteration in javascript, nodejs : <p>I have data like : - </p>

<pre><code>[
{"title": "A Hug Is Warm","id": "69","level": "4","act_title": "Alphabet","act_id": "69_1d"},
{"title": "A Hug Is Warm","id": "69","level": "4","act_title": "Recording","act_id": "69_rec"},
{"title": "A Hug Is Warm","level": "4","id": "69","act_title": "Print","act_id": "69_pr_1"},
.........
];
</code></pre>

<p>and want to return back : ......</p>

<pre><code>[{
        "title": "A Hug Is Warm",
        "id": "69",
        "level": "4",
        "activities": [{"act_title": "Alphabet",act_id": "69_1d"},
            {"act_title": "Recording","act_id": "69_rec"},
            {"act_title": "Print","act_id": "69_pr_1"}
        ]
    },
    ..........
]
</code></pre>

<p>In php it is very easy to achieve using a multidimensional array.</p>
