lodash.js fiddle

Added lodash from cdnjs.com in order to have lodash capabilities in chrome.

by Christopher O

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.1/lodash.min.js"></script>

JavaScript

console.clear();

var array = [1,2,3,4];
var anotherOne = [2,4];
var filteredArray = [];

const dtag = [
  { "n": "Auction Buyer", "i": 6, "s": 0, "id": "5e66565f79ed9902da685025" },
  { "n": "Business", "i": 2, "s": 0, "id": "5e66565f79ed9902da685021" },
  { "n": "Classic Cars", "i": 7, "s": 0, "id": "5e66565f79ed9902da685026" },
  { "n": "Classic cars", "i": 16, "s": 0, "id": "5e67bd7a79ed991dc00fc8fc" },
  { "n": "Constructions-or-Developers", "i": 14, "s": 0, "id": "5e66591779ed991dc00fc8f5" },
  { "n": "Dealership", "i": 5, "s": 0, "id": "5e66565f79ed9902da685024" },
  { "n": "Enclosed", "i": 8, "s": 0, "id": "5e66565f79ed9902da685027" },
  { "n": "FL", "i": 3, "s": 0, "id": "5e66565f79ed9902da685022" },
  { "n": "Freight Forwarder", "i": 4, "s": 0, "id": "5e66565f79ed9902da685023" },
  { "n": "Hawaii", "i": 9, "s": 0, "id": "5e66565f79ed9902da685028" },
  { "n": "Heavy-Equipment", "i": 15, "s": 0, "id": "5e66593379ed9902da68502d" },
  { "n": "Human-Resources-Department", "i": 13, "s": 0, "id": "5e66590679ed9902da68502c" },
  { "n": "International-Transport", "i": 11, "s": 0, "id": "5e6658e879ed9902da68502b" },
  { "n": "New Cars", "i": 18, "s": 0, "id": "5e67bd7a79ed991dc00fc8fe" },
  { "n": "Port Deliveries", "i": 19, "s": 0, "id": "5e67bd9c79ed991dc00fc8ff" },
  { "n": "Port Pick Ups", "i": 20, "s": 0, "id": "5e67bd9c79ed991dc00fc900" },
  { "n": "Puerto Rico", "i": 1, "s": 0, "id": "5e66565f79ed9902da685020" },
  { "n": "Spanish-Speaking", "i": 10, "s": 0, "id": "5e66567b79ed991dc00fc8f3" },
  { "n": "Traveling-Nurses", "i": 12, "s": 0, "id": "5e6658f479ed991dc00fc8f4" },
  { "n": "Used Car", "i": 17, "s": 0, "id": "5e67bd7a79ed991dc00fc8fd" }
];
/* 
filteredArray = _.difference(array, anotherOne);
console.log(filteredArray); 
*/

console.log( _.findIndex(dtag, {"i": 7}) );

var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
console.log( _.findIndex(users, { 'user':...