title: save JSON data to rails database
body: <p>I've created a autocomplete searchfield in which users can type a movie title and it will show all the results like this > <a href="http://i.imgur.com/Si9Fffv.png" rel="nofollow">http://i.imgur.com/Si9Fffv.png</a></p>
  
  <p>The next thing I want to do is give the user a option to save a movie title to the database. As you can see in the image every result has a "add" button. This is a link with the ID of the movie in it's target. It can be anything like a button or a span etc.</p>
  
  <p>When a user clicks on the add button I want to store the movie title of the movie with that ID in my database.</p>
  
  <p>I've generated a model called movie and a collumn called title. I've also generated a controller called movie and I've created a form field which lets the user type the movie title and then save it to do movie model > title collumn. But this was more for testing. Like I said above I want to save the movie title from a specific ID into my database.</p>
  
  <p>I know how to get the JSON respons from TMDB api, 
  <a href="https://api.themoviedb.org/3/movie/62?api_key=a8f7039633f2065942cd8a28d7cadad4" rel="nofollow">click</a></p>
  
  <p>But what I don't know is how to link my "add" button to that response and then grab some data like title or poster url and post it in my database.</p>