How to make get for drupal behaviors to run only once? Drupal.behaviors.js_mod = {
attach: function (context, settings) {
     //$('body', context).append(chart);
    // $( '#drupal-myradar', context ).once
     $.get( "/web/js/mod", function( data ) {
        console.log(data);
      });
}

    }
})(jQuery, Drupal, drupalSettings); 


Essentially this code is running multiple times while grabbing information from my controller code. I only want this to print out once to the console when the page is loaded.
If your script is high-level, which is most likely, then only run it when the context is equal to the document.
I found this trick in the autologout module and use it almost everywhere now:
Drupal.behaviors.dosomething = {
  attach: function attach(context, settings) {
    if (context !== document) {
        return;
    }
    // Do stuff here but still use .once when attaching behaviors.
  ...