Hey, all,
Let's say I have some locally hosted/downloaded JSON data like the following:
Now, let's say I wanted to aggregate/group that data to answer questions like the following:
1. How many distinct user.phonenumber.home OR user.phonenumber.fax are there?
2. For each distinct user, how many phonenumber entities do we have?
3. How many distinct user entities do we have?
4. For each distinct user.age, how many user entities have that user.age?
This isn't the exact dataset/queries I have, but it hopefully captures the idea. If I have a bunch of locally hosted/downloaded JSON data I want to aggregate/report on, what's the best way to do so? I'm not finding a clear solution after ~2 hours of research. I can try to learn D3 or something if I need to, but I'd prefer to find a more simple approach.
If there was a clever way to de-nest the data and get it into a standardized CSV format, that would be ideal, but I haven't been able to find a good solution, so far.
Thanks, all!
Let's say I have some locally hosted/downloaded JSON data like the following:
Code:
user: {
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address":
{
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber":
[
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
} ,
user: {
"firstName": "Jane",
"lastName": "Smith",
"age": 26,
"address":
{
"streetAddress": "29 2nd Street",
"city": "New York",
"state": "WA",
"postalCode": "90961"
},
"phoneNumber":
[
{
"type": "home",
"number": "212 555-5566"
}
]
}
Now, let's say I wanted to aggregate/group that data to answer questions like the following:
1. How many distinct user.phonenumber.home OR user.phonenumber.fax are there?
2. For each distinct user, how many phonenumber entities do we have?
3. How many distinct user entities do we have?
4. For each distinct user.age, how many user entities have that user.age?
This isn't the exact dataset/queries I have, but it hopefully captures the idea. If I have a bunch of locally hosted/downloaded JSON data I want to aggregate/report on, what's the best way to do so? I'm not finding a clear solution after ~2 hours of research. I can try to learn D3 or something if I need to, but I'd prefer to find a more simple approach.
If there was a clever way to de-nest the data and get it into a standardized CSV format, that would be ideal, but I haven't been able to find a good solution, so far.
Thanks, all!