SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var myArray = [
  2.   {
  3.     "DealerId": "32",
  4.      "AllowedProviders": "ATTv6,CENTURYLINK",
  5.   },
  6.   {
  7.     "DealerId": "24",
  8.     "AllowedProviders": "ACDNET",
  9.   }
  10. ];
  11.  
  12. var providerArray = ["ATTv6","ACDNET"];
  13.      
  14. var result = myArray.some(function (item) {
  15.     return  ((item.AllowedProviders.split(',')).some(r=> providerArray.includes(r)) && item.DealerId != 32);
  16. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top