JSON.parse how to pass id?

How to pass id from categories to selected separated by comma ” [1,2,3] ” ? Thanks!

var categories = JSON.parse(document.querySelector("#company_category_select").dataset.categories)

$('#company_category_ids').comboTree({
  source: SelectJSONData,
  isMultiple: true,
  cascadeSelect: false,
  collapse: true,
  selectableLastNode: true,
  selected: [],  <-----------
});