List id from json file

So i try to fill a list with json file like this:

[
{
“group_id”: “1”,
“system_id”: “1”,
“name_system”: “Security”,
“group_name”: “AdminSecurity”,
“group_date”: “2015-08-21”,
“group_active”: “1”,
“users”: “1”
},
{
“group_id”: “2”,
“system_id”: “1”,
“name_system”: “Security”,
“group_name”: “AdminUser”,
“group_date”: “2018-09-07”,
“group_active”: “1”,
“users”: “1”
}
]

$$(“groupList”).load(“groups.php”)

i used template:

template: “html->group_record” with “#id

Everything works fine, but when i try to retrieve some record with $$(“groupList”).getItem(id); an error occurs because id of list item was randomly generated.

How can i set the id value of a list item trough json file?

Sorry for my bad english.

JARB

Ok, i changed group_id for id on JSON and works fine. Thanks

if you can’t change data structure on the server side, you can do it on the client side by defining data scheme->$init

{
    view:"list",
    scheme: {
        $init: function(obj) {
            obj.id = obj.group_id;
        }
    }
}

https://docs.webix.com/desktop__data_scheme.html#initkey