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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:51:07+00:00 2026-06-15T00:51:07+00:00

<input id=some_id value=some_value> I need to create {some_id: some_value} (in other words i need

  • 0
<input id="some_id" value="some_value">

I need to create {some_id: some_value} (in other words i need to use as name of the attribute value of id) from upper input.

I tried:

jQuery('[name="page-numbers[]"]').map(function () {
  return { jQuery(this).attr('id'): jQuery(this).val()};
}).get();
jQuery('[name="page-numbers[]"]').map(function () {
  return {this.id: this.value};
}).get();

But every time i get an error near {this.id:. If only call this.id or this.value or same jQuery – result returns.

  • 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-15T00:51:08+00:00Added an answer on June 15, 2026 at 12:51 am

    In your case you should use square bracket notation for defined empty object:

    $('[name="page-numbers[]"]').map(function() {
        var obj = {};
        obj[this.id] = this.value;
        return obj;
    }).get();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to use Robot from awt, to input some text on a
I need some guidance/advices from someone who has any ideea about custom jquery event.
I have a project where I create hidden input values with jQuery. These represent
I need to create a stored procedure to do the following; SELECT * FROM
browsing some html code I find a text input coded as: <input type=text name=Email<%=orderRow.ID
I'm trying to create a service in which the user will input some text
I need to split a portion of functionality away from a legacy ISAPI dll
I have a form like below I need to create an array for each
I want to create a ASP.NET user control from an XML using XSLT. Currently
I need some help I am trying to create a PHP form using sqlite3

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.