{"size": 425, "ext": "js", "max_stars_repo_path": "Objects and Composition - Exercise/HeroicInventory.js", "max_stars_repo_name": "DiyanKalaydzhiev23/JavaScript-Advanced", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Objects and Composition - Exercise/HeroicInventory.js", "max_issues_repo_name": "DiyanKalaydzhiev23/JavaScript-Advanced", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Objects and Composition - Exercise/HeroicInventory.js", "max_forks_repo_name": "DiyanKalaydzhiev23/JavaScript-Advanced", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.5625, "max_line_length": 59, "alphanum_fraction": 0.5717647059}
function makeRegister(data) {
    const register = [];

    for (i = 0; i < data.length; i++) {
        let [name, level, items] = data[i].split(" / ");
        items = items ? items.split(', '): [];
        register.push({name, level: Number(level), items});
    }
    return JSON.stringify(register);
}


console.log(makeRegister(['Isacc / 25 / Apple, GravityGun',
'Derek / 12',
'Hes / 1 / Desolator, Sentinel, Antara']));
