[Solved] Insert new group into JSON using Javascript


You can just assign values,

modules.groups["<group key>"] = {
    "name": "Tutorial 123",
    "members": ["97xx08xx01", "97xx08xx05", "97xx08xx03"]
}

PS: I think you are new to stackoverflow. Though I answered this question, this type of questions are not encouraged in this community. How to add attributes to a JSON is a very basic thing which is explained in million tutorials, and probably answered here on stackoverflow probably years back. Do the homework before you ask for help.

0

solved Insert new group into JSON using Javascript