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

  • Home
  • SEARCH
  • 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 6005135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:21:34+00:00 2026-05-23T01:21:34+00:00

Considering I have an array of objects, and all objects represent something out of

  • 0

Considering I have an array of objects, and all objects represent something out of a database, thus they have an unique identifier.

Now I also have the ID and the correct array. How do I search each object in that array where the parameter ‘id’ equals my ID. (The point is, I don’t know the internal identifier for that object. All I have is an ID and I need the entire object for description, last_user, created etc..)

Object
created: "2011-06-08 15:47:11"
description: "Something new.."
id: "1"
last_user: "1"

P.s. I have jQuery embedded, so if there’s no default way, a jQuery function would suffice.

  • 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-23T01:21:34+00:00Added an answer on May 23, 2026 at 1:21 am

    $.grep() should do it. In the following example arr is your array of objects. It will find the element that has an id of 1.

    var obj = jQuery.grep(arr, function(el, i){
      return el.id == 1;
    })[0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering you have an MVVM Architecture in WPF like Josh Smith's examples How would
I have been considering taking the plunge and installing Linux on my Playstation 3.
Logging can get complicated, quickly. Considering that you have some code, how do you
I have this small code library that I'm considering releasing into Open Source. I
I'm considering the following: I have some data stream which I'd like to protect
I'm considering integrating some D3D code I have with WPF via the new D3DImage
I'm considering using Annotations to define my Hibernate mappings but have run into a
We are considering a move from SVN to Mercurial, and have encountered a stumbling
I have an array with 250k entities (with a size of 20 bytes) and
I am not able to add objects to a simple NSMutableArray. I have an

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.