for (let g = 0; g < not_restaurant.length; g++) { checked = (data[i].id === not_restaurant[g].restaurant_id) ? 'checked' : ''; }