Skip to main content

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.

html - how change form data json , pass api using post method? - stack overflow

learn, share, build

each month, on 50 million developers come stack overflow learn, share knowledge, , build careers.

join world’s largest developer community.

sign up

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.

share|improve question
    
you can’t plain html. – gumbo jul 7 '12 @ 10:24
    
can more specific. talking rails here? if on client talking js, have @ jquery. – roger aug 22 '12 @ 6:49

your answer

 
discard

posting answer, agree privacy policy , terms of service.

browse other questions tagged or ask own question.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -