Insert Json into sqlite data base

I need to create table and insert below json response into sqlite data base.

{ “parameters”: [ { “name”: “Test”, “value”: “Testing”, “message”: “Success” } ], “statusCode”: 200 }

Have to create Database table as below and insert json response.
Parameters name,Value ,Message,statuscode

How to achieve this in Ruby on rails?


it can be done without Rails with ruby

You will need this :

and the gems json depending of your version of ruby

require 'json'
value = '{"val":"test","val1":"test1","val2":"test2"}'
puts JSON.parse(value) # => {"val"=>"test","val1"=>"test1","val2"=>"test2"}

This article might help :

PS It's a huge security risk to accept input with these character:    # => {"}