code: public static function sort($a, $b)
      {
          if (!isset($a['position'])) {
              return 0;
          }
  
          if (!isset($b['position'])) {
              return 0;
          }
  
          if ($a['position'] === $b['position']) {
              return 0;
          }
          return ($a['position'] < $b['position']) ? -1 : 1;
      }
docs: Sort function user in sortNav
  @param $a
  @param $b
  @return int