Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to filter a JavaScript object to show only the data I need
    primarykey
    data
    text
    <p>I have this json object- it's abbreviated, but it looks somewhat like the following</p> <pre><code>{ "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" } } ] } </code></pre> <p>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:</p> <pre><code>{ "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" } } </code></pre> <p>Hope someone can help- Thanks alot! Marco</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload