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

  • Home
  • SEARCH
  • 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 7578429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:25:50+00:00 2026-05-30T17:25:50+00:00

What I want to achieve is passing a json string as Get method to

  • 0

What I want to achieve is passing a json string as Get method to server with jquery. The content that is sent back is html type. I use the function .get(“url”, myJson, callback) to accomplish this.

To make my json string I verify some checkbox and textbox to get their content and add their id/value on the json string if needed.

I used an array that I added my value like:

var array = new Array();
array.push("att_id:"+value);

and then used this to make the json:

var jsonString = "{" + array.join(",") + "}";

But when I make a request to the server like this:

$.get(
    "localhost/something",
    $jsonString,
    function(data){
        $("#something").html(data);
});

It doesn’t work cause it pass the jsonString as the arraykey and a null value.
So I’m looking for a method to achieve this.

  • 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-30T17:25:51+00:00Added an answer on May 30, 2026 at 5:25 pm

    Try this (quick fix):

    $.get(
        "localhost/something",
        {theData:array},
        function(data){
            $("#something").html(data);
        }
    );
    

    Or, more in the spirit of jQuery (since you really want to pass a Javascript key-value map (i.e. an object) rather than a pre-JSON-ified string):

    var $dataObj = {};
    $dataObj["att_id"]=value;
    
    // and then
    $.get(
        "localhost/something",
        $dataObj,
        function(data){
            $("#something").html(data);
        }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am passing some html content to a browser field. The content is getting
In my plugin architecture I am currently passing a plugin name (string), method name
I am trying to achieve a JQuery AJAX call to a controller action method
I have method that transforms some input value by the user passing it a
I want to achieve the following: ID | Counter ------------ 0 | 343 1
I want to achieve the effect of a 2D image I have but a
I want to achieve something like the following: UrlBuilder ub = new UrlBuilder(http://www.google.com/search); ub.Parameters.Add(q,request);
I want to achieve something like this in C# 3.5: public void Register<T>() :
What I want to achieve is this. I want to give the user the
What I want to achieve is as follows: For example, there is a symbol

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.