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);
}
}
});
}
I am not really sure what you what, but I assume that you are trying to get the
filteredItemslist based on the matched items b/witemslist +clientIDandsaved_tokens.Try,