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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:43:49+00:00 2026-06-01T21:43:49+00:00

At the moment we have an AJAX driven site that returns a JSON response

  • 0

At the moment we have an AJAX driven site that returns a JSON response in the following format: [{"n":"bob"}, {"n":"jim"}, ..., {"n":"alex"}]. Basically an array of json objects.

However we are thinking about structuring it like so: [["bob"], ["jim"], ..., ["alex"]]. Basically an array of arrays.

The obvious difference is that instead of accessing the data via its properties, we’d be accessing it via assumed index positions (i.e., array[0] == name), but besides that I am curious what the pros/cons are of each. Interesting factors: performance on the client (both constructing the data structure and retrieving its values), bandwidth (obviously on larger data sets or for slower internet connections, say mobile devices), design pattern/best practice, how others have designed their responses, etc…

  • 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-01T21:43:50+00:00Added an answer on June 1, 2026 at 9:43 pm
    • When using an object-in-array format, you can load more data per item, and not just n.

      [{
              'name' : 'John',
              //more data about john
      },{
              'name' : 'Joe',
              //more data about joe
      }]
      //myArray[0].name = John
      
    • When using the array, the data return is assumed to be of the same kind.

      ['John','Joe'...] //all names
      //myArray[0] = John
      

    but it all boils down to how you parse data.


    structuring data like this:

    [["bob"], ["jim"], ..., ["alex"]]
    

    is totally wrong. why put the name in an array, in an array of names? what’s the second level for?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment, I have a simple app that Ajax's to a server, gets
At the moment I have a DocumentViewer in a WPF window that displays an
At the moment I have a combobox that is populated from the name fields
At the moment I have the following code which works fine. label = new
I'm learning Ajax at the moment. The code below basically receives the echo from
Ok so i have a form that has three input boxes, at the moment
I have the following problem/doubt that I hope somebody could help me with. Let's
I basically have an ajax function which gets the latest posts from a database,
So I have a really simple form on a website that's entirely AJAX based
I have seen approaches of AJAX requests to Controllers or Services (.asmx, .svc) that

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.