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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:15:09+00:00 2026-05-30T19:15:09+00:00

I have a saved_tokens hashtable. I also have the key and the value. I

  • 0

I have a saved_tokens hashtable. I also have the key and the value. I would like to check the hashtable to see if the pair exist, if exist, do something. Thanks.

Code thus far

var saved_tokens = {}

//method
    _suggest: function( items, clientId ) {

        var filteredItems = [];

        $.each(items, function(i, item ) {
            if(saved_tokens.hasOwnProperty(clientId)) { 

                //need to test for item here
                if(item exist need help) {
                    filteredItems.push(item);
                }
            }
        }); 
   }
  • 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-30T19:15:10+00:00Added an answer on May 30, 2026 at 7:15 pm

    I am not really sure what you what, but I assume that you are trying to get the filteredItems list based on the matched items b/w items list + clientID and saved_tokens.

    Try,

    _suggest: function( items, clientId ) {
    
            var filteredItems = [];
    
            $.each(items, function(i, item ) {
                if(saved_tokens.hasOwnProperty(clientId) &&
                             saved_tokens[clientID] === item) {
                        filteredItems.push(item);
    
                        //add a return false here to terminate the loop.
                    }
                }
            }); 
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Makefile that starts a Django web server. I would like the
We have a library of ZIP files that we would like to make available
I have multiple texts and I would like to create profiles of them based
I have saved an html page using the following line of code : NSURL
I have saved an image path in database like so: C:\Users\3embed\Documents\Visual Studio 2010\Projects\HeritageWeb\HeritageWeb\Images\startbutton.png I
I have saved photos to my customised album in my app using code [library
I would like to create a site-wide hash to be used as salt in
I have the following code in my sessions controller which saves information such as
I have calculator code where I need to save a given line (one line
I have a batch file that will check for updates within a directory then

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.