Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9237701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:35:34+00:00 2026-06-18T07:35:34+00:00

While i tried to get json data from html inputs i found this thread:

  • 0

While i tried to get json data from html inputs i found this thread:
Convert form data to JavaScript object with jQuery

The serializeObject function does most of the things I need, there is only one thing I haven’t got done yet

I have 4 characters and to each of them the user can assign 0 to 3 points

So the json I get is

{"charakter1":"0","charakter2":"2","charakter3":"3","charakter4":"1"}

But i would like save this information as array, so what i want is

{"charakter":[0,2,3,1]}

How do i have to change the name of the radio buttons to get this array?

I created a jsfiddle for this
http://jsfiddle.net/sxGtM/3028/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:35:35+00:00Added an answer on June 18, 2026 at 7:35 am

    Try using arrays for the variables, like this:

    <input type="radio" name="charakter[2]" value="0"/>0
    <input type="radio" name="charakter[2]" value="1" checked />1
    <input type="radio" name="charakter[2]" value="2"/>2
    <input type="radio" name="charakter[2]" value="3"/>3<br/>
    
    <input type="radio" name="charakter[3]" value="0"/>0
    <input type="radio" name="charakter[3]" value="1" checked />1
    <input type="radio" name="charakter[3]" value="2"/>2
    <input type="radio" name="charakter[3]" value="3"/>3<br/>
    

    Results in this:

    {"charakter":["0","2","3","1"]}
    

    jFiddle is here:
    http://jsfiddle.net/sxGtM/3029/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm retrieving data from MySql with php like this => while ($birthday_row = $birthday_r->fetch_row()){
I have a query on retrieving data sent as JSON from a JavaScript, inside
I have this JSON Object which I receive from the api.moviedb.com It is pretty
I have an html page that would send json request to get the data
I've got a JSON value that has been converted from a JavaScript object using
I made an activity Messages which is supposed to get JSON data from a
I've tried to overcome this for a while. I'm trying to record sound, but
i have tried to to load the data to text box, while selecting the
I use the class below to get some JSON data. The strange thing is,
My Android App needs some basic data to run. This data is downloaded from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.