David Kimura PRO said over 2 years ago on Slim Select with Stimulus :
  rafal.siepak   It's hard to troubleshoot without more information. But if I had to guess, the logs would probably look something like this.

Processing by CategoriesController#index as */*
  Parameters: {"query"=>"something"}
No template found for CategoriesController#index, rendering head :no_content

If that is the case, then the code for the format.json will not get picked up. You should update your URL in the view where you're passing in the URL into the stimulus controller with the json format. Something like this should work. 

'select-url-value': categories_url(format: :json)

By doing that, it should then respond with the proper format.

Processing by CategoriesController#index as JSON