I wanna read an array of hashes as parameter from postman (or anything else).
postman:
{
"domains": [
{"id":"1", "name": "aa"},
{"id":"2", "name": "bb"}
]
}
I need to read this parameter exactly like this:
ruby on rails:
[
{"id":"1", "name": "aa"},
{"id":"2", "name": "bb"}
]
How can I do that?
Content-Type: application/json) of a POST request? If so have you tried accessing it usingparams[:domains]in the controller?params[:domains], I receive ``` [<ActionController::Parameters {"id"=>"1", "name"=>"aaa"} permitted: false>]```. but I need to read exactly like my question.