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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:07:07+00:00 2026-06-13T23:07:07+00:00

I have a javascript json result list – self.data.allOrganizationsList self.data.allOrganizationsList contains list of organization

  • 0

I have a javascript json result list – self.data.allOrganizationsList

self.data.allOrganizationsList contains list of organization whose properties are

customentityaccess, id, isLabsAccessAllowed, memberCount, organizationname, organizationwebsite

i want to access an organization object which has
id = 402881702121fec10121520080930001

I am trying to get this from the below statement, but since each item in the list is an object, i am unable to get the desired result.

self.data.allOrganizationsList.id['402881702121fec10121520080930001']`
//(or)
self.data.allOrganizationsList["id"]['402881702121fec10121520080930001']

Other alternative is to use the $.each(self.data.allOrganizationList, function(index, item)).

But can i achieve the above result without iterating the – self.data.allOrganizationList

From the $.grept()

var myvar = $.grep(response.permissionedOrganizations, function(v) {
            return v.id === '40288170227c142201227eb56c5c000a';
        })[0];
console.log(myvar);

displays undefined in console. Am i missing something.

  • 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-13T23:07:08+00:00Added an answer on June 13, 2026 at 11:07 pm

    With your structure, you want $.grep to filter out the correct element:

    var arr = [
      {id: 1, value: 2},
      {id: 3, value: 4}
    ];
    
    $.grep(arr, function(v) { return v.id === 3; })[0];  // second element
    

    Note that this does iterating behind the scenes – there’s not a way to get the correct element by using [key] notation as that’s not how your structure is defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following JSON data being returned, but for some reason, Javascript or
Possible Duplicate: How to parse JSON in JavaScript I have this JSON string: [{title:
I have a javascript function create(tagName, options) and the options variable is a JSON
I have a working JavaScript code below which dynamically creates JSON object using JSON.parse
I have no idea how to properly 'return' this JSON object (in JavaScript): function
I have updated my jSon object using the code <script type=text/javascript > jQuery(document).ready(function($){ var
I have JavaScript application, where I use client-side templates (underscore.js, Backbone.js). Data for initial
I have a list that I need to fill using a JSON collection of
I'm having troubles reading a Json result back from a controller method... I have
I have a Javascript function called sendData . var sendData = function (data) {

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.