html - How to change the form data into json and pass to api using post method? -
id:<input type="text" id="id" required="required"></br> name:<input type="text" id="name" required="required"></br> <input type="submit" id="submit">
i have form, have placed above code. , can give values. need is, have send value give in text box api in specific format shown below.
{ "entry": { "id":"", "name":"" } }
i have using ruby. not using rails or other framework. how can this? if possible give me code examples.
i have form, have placed above code. , can give values. need is, have send value give in text box api in specific format shown below. i have using ruby. not using rails or other framework. how can this? if possible give me code examples. | |||||||||
|