Multiple checkboxes Gutenberg control

Use this code

$.each(data, function (c, fields) {
  checkboxes.push(
    el( CheckboxControl, {
      key: fields.value,
      label: fields.label,
      name: 'myCheckbox[]',
      checked: props.attributes.myCheckbox.indexOf(fields.value) > -1,
      onChange: function( val ) {
        let data = props.attributes.myCheckbox;
        if (val) {
          if (data.indexOf(fields.value) === -1) {
            data.push(fields.value);
          }
        } else {
          data = props.attributes.myCheckbox.filter((v) => v !== fields.value);
        }
        props.setAttributes({ myCheckbox: data });
      }
    })
  )
})

tech