title: Get parameters JSON Rails
body: <p>I am having this POST request:</p>
  
  <pre><code>app/controllers/videogames_controller.rb:10:in `search'
  Started POST "/videogames/search" for 127.0.0.1 at 2018-09-04 10:39:10 +0200
  Processing by VideogamesController#search as JSON
  Parameters: {"user"=&gt;{"param"=&gt;"FIFA"}, "videogame"=&gt;{}}
  </code></pre>
  
  <p>and the following controller:</p>
  
  <pre><code>def search
     @p = Videogame.where(name: params[:param])
     render :status =&gt; 200, :json =&gt; { :data =&gt;  @p}
  end
  
  def videogame_params
     params.permit(:user, :param)
  end
  </code></pre>
  
  <p>What I am trying to do is to send a string to the rails backend (in this case FIFA), so to make a query in the database and to return some objects. </p>
  
  <p>The problem is that I can't figure out how to get the string "FIFA" from the parameters, in order to make the query with it. If I use params[:params] I get a NULL value. </p>