function loadResult(dataJSON) {
    const data = JSON.parse(dataJSON);
    if (data.title) $('#test-title-label').text(data.title);
    changeTestMode();
    changeTestMode(data.type);
    for (let group_i = 0; group_i < data.groups.length; group_i++) {
        const group = data.groups[group_i];
        addGroup(group.label);
        for (let case_i = 0; case_i < group.inputs[0].values.length; case_i++) {
            addCase(group_i);
        }
    }

    // Add input values
    for (let input_i = 0; input_i < data.groups[0].inputs.length; input_i++) {
        const input = data.groups[0].inputs[input_i];
        const values = data.groups.map((group) => group.inputs[input_i].values);

        addInput(input.label, input.bitWidth, values);
    }

    // Add output values
    for (let output_i = 0; output_i < data.groups[0].outputs.length; output_i++) {
        const output = data.groups[0].outputs[output_i];
        const values = data.groups.map((group) => group.outputs[output_i].values);
        const results = data.groups.map((group) => group.outputs[output_i].results);
        const expectedOutputs = [];
        const actualOutputs = [];

        for (let group_i = 0; group_i < values.length; group_i++) {
            const groupExpectedOuts = [];
            const groupActualOuts = [];
            for (let val_i = 0; val_i < values[group_i].length; val_i++) {
                groupExpectedOuts.push(values[group_i][val_i]);
                groupActualOuts.push(results[group_i][val_i]);
            }

            expectedOutputs.push(groupExpectedOuts);
            actualOutputs.push(groupActualOuts);
        }
        addOutput(`${output.label}`, output.bitWidth, expectedOutputs, true, actualOutputs);
    }
}
Loads result from JSON string into the testbench creator UI