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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:36:32+00:00 2026-05-27T10:36:32+00:00

I am using JSON to get the data. What is happening the JSON-P changes

  • 0

I am using JSON to get the data.

What is happening the JSON-P changes the order of column and put them alphabetically.

The JSON is:

[{ "Grade"="pv" , "ID" = 1 , "Name" = "test" }]

But i actually send it ID first.

After getting this JSON i use the following line:

 var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;

Then i am about to convert this array to an HTML table.

But when i bond HTML label i want to show the Column ID first and so on. (Means i can configure using jquery which column to show first).

How can i do that efficiently?

The Question is rewritten because lot of users are not able to understand my question because of lack of my communication skills

Eaxmple: (Whatever the format i get does not matter but using Jquery how can i able to hardcode which column to show first)

Its like changing the array column order

Thanks

  • 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-27T10:36:33+00:00Added an answer on May 27, 2026 at 10:36 am

    The data represented by an object in JSON has no inherent order, so you can’t count on JSON to maintain an order for an unordered object. If order is important, but arbitrary, your best bet is to use an ordered object such as an array to store the data.

    // documentation says first element is always id, second grade, third name
    [[1, "pv", "test"], …]
    

    Barring that, you can keep a side-by-side index in an array to help you recover the order.

    [{
        "ordering": ["ID", "Grade", "Name"],
        "ID": 1,
        "Grade": "pv",
        "Name": "test"
    }]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I parse data using JSON in javascript, I find this is very convenient. But
I'm using code below to get JSON data: [AcceptVerbs(HttpVerbs.Get)] public JsonResult getBranchViaJson() { Json(getBranchList(AppSession.BranchID.Value));
I am using this code to try to get json data from many json
I have a problem regarding return data using JSON. How do i get the
I'm trying to get a JSON string using the Google Spreadsheets Data API. I'm
I used Json to get data off a site build in Wordpress (using the
I cant find one way to get this value (comment) into json using javascript.
I'm making call to Alfresco Webscripts which return JSON. I do this using GET
I am using json.net to parse objects and delivering them to a webservice I
I am using json data and iterating it through jquery and displaying my results...

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.