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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:12:57+00:00 2026-05-29T04:12:57+00:00

I have a very large json like : raw_obj= {001 : {….}, 002 :

  • 0

I have a very large json like :

raw_obj= {"001" : {....}, "002" : {....}};

and I have an another json object which is just returned from server :

search_result = {["001", "005", "123"]};

I want to do something like

$.each(search_result, function(i,val){
 alert(raw_obj.search_result[i]);
});

Is it possible? I don’t want to loop through those 2 objects because in practical, there will be have around 2000 elements in a “raw_json”. Which means the worst case is 2000×2000 times loop per one query.

  • 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-29T04:12:58+00:00Added an answer on May 29, 2026 at 4:12 am
    var raw_obj= {"001" : {'...'}, "002" : {'...'}};
    var search_results = ["001", "005", "123"];    // just an array
    
    $.each(search_results, function(i, result) {
        alert(raw_obj[result]);
    });
    

    The search results are an array (ie, list), not an object (ie, map) and so the syntax should be modified as above. If you have no control over the server response, use string parsing to build a new array.

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

Sidebar

Related Questions

I have a very large integer returned by a json string from my server
I have a very large response from server of JSON string. I converted it
I have a very large (~6GB) SVN repository, for which I've written a batch
I have a very large file that looks like this (see below). I have
I have a very large app, 1.5 million lines of C++, which is currently
I have a very large query that follows the format below: select ... from
I have very large website which uses a lot of cookies. There are approx.
I have very large files (more than 10Gb). I need only some lines from
I have a very large table in Mathematica ((dimcub-1)^3 elements) coming from an inverse
I have two test cases using a reasonably large json object (1.2mb): source: 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.