nested hash | Ram Laxman Yadav

nested hash

How to Wrap hash into nested hash without any root element

Hello Friends, Generally we request a root element in request params, from a rest api. Suppose if you have a REST api for create user with name then you have to give data in format like: {"user": {"name": "somename"}}.