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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:11:09+00:00 2026-06-06T16:11:09+00:00

If I wanted to make one request, but return multiple groups of responses, how

  • 0

If I wanted to make one request, but return multiple groups of responses, how would I separate them to be able to parse them in jQuery and get the .length as well of each group?

First Group (A)

[
   {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
   ,{"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
]

Second Group (B)

[
   {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
   ,{"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
]

Total Response (Single request):

[
   {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
   ,{"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
]
,[
   {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
   ,{"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
]

Or would I return it in another way to properly do this? Or would I have to do them separately, I prefer to keep it in one response.

  • 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-06T16:11:10+00:00Added an answer on June 6, 2026 at 4:11 pm

    You can make them into an array, or an object with each group as an element in the array or object

    object

    {
      "groupa":[
       {"name":"Tu\u011Frul","surname":"Topuz SR","message":"Hello World"},
       {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
        ],
      "groupb":[
        {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"},
        {"name":"Tu\u011Frul","surname":"Topuz JR","message":"Hello World"}
    ]}
    
    success(data){
        data["groupa"].length//number of items in group a
        data["groupa"][0]["surname"] == "Topuz SR"//true;
        data["groupb"][1]["surname"] == "Topuz JR"//true;
    }
    

    array

    [[
       {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"},
       {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
        ],
      [
        {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"},
        {"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
    ]]
    
    
    success(data){
        data[0].length//number of items in first group
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen few questions similar to this one, but I wanted to make
I wanted to make a post request in this website: http://www.prezup.info/index.php?page=films in order to
I apologize in advance for the long-winded question but I wanted to make sure
I don't typically play with Cookies, but I wanted to look into this one
I wanted to make some simple file recovery software, where I want to try
I wanted to make a basic custom keypad for the iPhone , I did
I wanted to make an application that will take either the path of the
I wanted to make a function that populates a Grid in WPF with pictures.
I wanted to make a button which is transparent until the user hovers over
I wanted to make a simple parser, for a pseudo code like language(kept rigid),

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.