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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:44:06+00:00 2026-06-09T10:44:06+00:00

In my project I need to aggregate many data in one string and later

  • 0

In my project I need to aggregate many data in one string and later parse it out.
The data is related to people, it need to record people_ids in different state and age group, and their counts.
For example, we have 5 people named John Smith in CA, 2 people between 20-29, 2 between 30-39, 1 between 40-49; 2 people named John Smith in NY, 1 between 20-29 and 1 between 30-39. Then the string will be somewhat like this,

John smith| [CA#5: 20-29#2{pid_1, pid_2};30-39#2{pid_3,pid_4};40-49#1{pid_5}] [NY#2: 20-29#1{pid_6};30-39#1{pid_7}] 

It not necessarily be the same format, but whatever format easy to parse out. Is there any good way to do this? How about Json format?
And if it looks like the above format, if I want all John Smith in CA between age 30-39, how should I parse out the data?
Thanks a lot!!

  • 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-09T10:44:08+00:00Added an answer on June 9, 2026 at 10:44 am

    From my understanding of your post, this might be a format you’re looking for (as represented in JSON).

    Keep in mind that there are gems that can generate and parse JSON for you.

    {
        "name": "John Smith",
        "states": {
            "CA": {
                "total": 5,
                "ages": {
                    "20-29": [pid_1, pid_2],
                    "30-39": [pid_3, pid_4],
                    "40-49": [pid_5]
                }
            },
            "NY": {
                "total": 2,
                "ages": {
                    "20-29": [pid_6],
                    "30-39": [pid_7]
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

for my current project i need to consume messages from many destinations (from hundreds
In my project i need to take an expression input from user as string
In my project i need to load aml data from internet and after that
One of my project need a function to detect the price change of the
For a current project I am working I need to return an aggregate report
My scenario is: Two different parts (ASP.NET MVC Areas) of my project need the
my project need to read multiple web pages at a time(eg: for a particular
My project need to compare output(only urls) of google and yahoo for a particular
My android app project need to add a new function of saving the click
The Junits I have in my project need to load property files from the

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.