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 7642067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:05:43+00:00 2026-05-31T09:05:43+00:00

This is a question that has come up a few times on here in

  • 0

This is a question that has come up a few times on here in the past but I just can’t get my head around it.

This is how my output is looking at the moment:

0 "affiliate_hoover_plugin_options[1][radioName]:mac"

1 "checked:true"

2 "affiliate_hoover_plugin_options[2][radioName]:pc"

3 "checked:false"

4 "affiliate_hoover_plugin...ons[3][radioName]:linux"

5 "checked:false"

And this is how I want it to look:

1: "affiliate_hoover_plugin_options[1][radioName]:mac", "checked:true"

2: "affiliate_hoover_plugin_options[2][radioName]:pc", "checked:false"

3: "affiliate_hoover_plugin...ons[3][radioName]:linux", "checked:false"

This is how my code looks:

var newForm = [];

for (var i = 1; i < oldForm.length; i += 1) {

newForm.push(oldForm[i].name + ":" + oldForm[i].value);

if (oldForm[i].type === "radio") {
    newForm.push("checked" + ":" + oldForm[i].checked);
}

}

console.log(OnewForm);

Now I’m going to have put an extra for loop in there aren’t are, which is where I’m confusing myself.

I think I just need a break

  • 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-05-31T09:05:45+00:00Added an answer on May 31, 2026 at 9:05 am

    like this?

    var newForm = [];
    
    for (var i = 1; i < oldForm.length; i += 1) {
        if (oldForm[i].type === "radio") {
            newForm.push( [ oldForm[i].name + ":" + oldForm[i].value, "checked:" + oldForm[i].checked ] );
        } else {
            newForm.push( [ oldForm[i].name + ":" + oldForm[i].value ]);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's possible that this question has already been asked, but I can't seem to
I realize that this question has been asked 100times but none that I have
I know that this question has been asked several times and I've read all
While I realize that this question has been asked once or twice ago but
I've seen this come up a few times but I haven't really seen a
I have a UIView subclass ( CustomView for purposes of this question) that has
This is a question that has been bugging me for a while. I started
This is similar to a question that has already been asked. However, I am
This question follows on from a previous question, that has raised a further issue.
Similar to this question I have a custom subclass of UITableViewCell that has a

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.