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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:10:02+00:00 2026-05-26T09:10:02+00:00

I have the below Json object in jquery which i m using to fill

  • 0

I have the below Json object in jquery which i m using to fill a jquery grid.

Now i need to sort it on the basis of “performanceName”.

Please advice how i can achieve this. Please i knw same kinda question is posted 100 times but still i m struggling to implement sorting on below json

{
    "callback": "",
    "html": "",
    "message": [
        ""
    ],
    "responseData": [
        {
            "collectionTitleId": 1107861,
            "collectionTitleIdSpecified": true,
            "performanceField": {
                "addedDate": "6/16/2011 11:11:10 PM",
                "artist": "Corbis",
                "performanceName": "Showcase Graphic 003 - Anime Girl Purple",
                "performanceType": "Graphic",
                "provider": "DMSP Dynamic Digital"
            },
            "sortOrder": "01"
        },
        {
            "collectionTitleId": 1113513,
            "collectionTitleIdSpecified": true,
            "performanceField": {
                "addedDate": "5/25/2011 9:27:39 AM",
                "artist": "Beloved",
                "performanceName": "Hating On Your Feet (Verse)",
                "performanceType": "LabelTone",
                "provider": "p1"
            },
            "sortOrder": "02"
        }
    ],
    "status": [
        "Success"
    ]
}

Thanks in advance

  • 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-26T09:10:03+00:00Added an answer on May 26, 2026 at 9:10 am

    You can use Array.prototype.sort to in-place sort an array. Without any arguments, this attempts to sort elements alphabetically, but you can pass in a comparing function instead. This function receives two arguments and should return less than 0, 0 or greater than 0 to define where argument 1 should be in relation to argument 2.

    Your sorting function should look something like this:

    data.responseData.sort(function (a, b) {
        a = a.performanceField.performanceName,
        b = b.performanceField.performanceName;
    
        return a.localeCompare(b);
    });
    

    Working demo: http://jsfiddle.net/AndyE/aC5z4/

    localeCompare does the hard work of comparing the strings for us.

    • sort method
    • localeCompare method
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to serialize an object to JSON . I'm using jQuery . Is
I am having trouble getting some data from a JSON object which I have
I have a basic question on JSON Jquery, and it seams I am sort
So, I have 3 variables being passed in: stats (JSON object, shown below) place_type
I have cascaded dropdown in my application, cascaded using jquery, now my problem is
I have below is the html code for TD which gets appended after matching
I have this url which is JSON webservice http://ws.geonames.org/weatherJSON?north=90&south=-9.9&east=-22.4&west=55.2 I need to write a
Example: I have the following JSON object. {currentVersion : 10.0, folders : [], services
I have a c# object (below) that I'm trying to send to my javascript.
I need some advice on how I am using JQuery, JSP and Lucene to

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.