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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:06:18+00:00 2026-05-27T11:06:18+00:00

I have this json object- it’s abbreviated, but it looks somewhat like the following

  • 0

I have this json object- it’s abbreviated, but it looks somewhat like the following

{
"q": [
    {
        "a": [],
        "asked_at": "2011-12-08T05:58:45.695958",
        "closed_at": null,
        "event": "/api/v1/event/2/",
        "id": "2",
        "is_open": true,
        "is_public": true,
        "question": "Testing the question entry point with curl",
        "updated_at": "2011-12-08T05:58:47.026834",
        "user": {
            "email": "test@t.com",
            "first_name": "",
            "last_name": "",
            "profile": [],
            "username": "wout"
        }
    },
    {
        "a": [],
        "asked_at": "2011-12-08T05:59:39.941603",
        "closed_at": null,
        "event": "/api/v1/event/2/",
        "id": "3",
        "is_open": true,
        "is_public": true,
        "question": "Testing another question entry point with curl",
        "updated_at": "2011-12-08T05:59:43.388709",
        "user": {
            "email": "test@t.com",
            "first_name": "",
            "last_name": "",
            "profile": [],
            "username": "wout"
        }
    }   
]
}

Where q is a question being asked, and every a would be an answer (not shown, no answers are given in this example).
How would I go about it, if I wanted to get only the one item with an id of ‘3’ so that I would be left with a result of:

{
        "a": [],
        "asked_at": "2011-12-08T05:59:39.941603",
        "closed_at": null,
        "event": "/api/v1/event/2/",
        "id": "3",
        "is_open": true,
        "is_public": true,
        "question": "Here's a test entry point with curl",
        "updated_at": "2011-12-08T05:59:43.388709",
        "user": {
            "email": "test@t.com",
            "first_name": "",
            "last_name": "",
            "profile": [],
            "username": "wout"
        }
    }

Hope someone can help- Thanks alot!
Marco

  • 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-27T11:06:18+00:00Added an answer on May 27, 2026 at 11:06 am

    The grep function can filter an array

    var questionsWithId3 = $.grep(yourObj.q, function() { return this.id === "3"; });
    

    This will return an array, so if you’re sure there will only be one result, you can do:

    var questionWithId3 = $.grep(yourObj.q, function() { return this.id === "3"; })[0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a json object that looks something like this: Array ( [algorithm] =>
I have a JSON object that looks like this. [ { id : 23,
I have a JSON object like the following: {Data: { 290: { ... }
i have this JSON object: {error:null, result:[{id:1234567890, count:1, recipients: [u3848, u8958, u7477474 ], dateCreated:2012-06-13T09:13:45.989Z
I have this json object : { msg_id:134, message:Dick, comment:[ { com_id:9, comment:test, msg_id:134,
I have no idea how to properly 'return' this JSON object (in JavaScript): function
I have this json object (which i don't really know what is inside) and
I have a Servlet that sends back a JSON Object and I would like
Say i have this short code: item = Item.find(params[:id]) render :json => item.to_json but
I have MySQL database, where I store the following BLOB (which contains JSON object)

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.