I know this is an old question, but I thought I would share this little trick.
var diff = $(old_array).not(new_array).get();
diff
now contains what was in old_array
that is not in new_array
More Related Contents:
- Creating a JavaScript global array with static elements?
- How to find the sum of an array of numbers
- Converting JavaScript object with numeric keys into array
- Convert array to JSON
- Why does typeof array with objects return “object” and not “array”? [duplicate]
- Finding matches between multiple JavaScript Arrays
- Parsing JSON objects for HTML table
- How to find if an array contains a specific string in JavaScript/jQuery?
- Get the index of the object inside an array, matching a condition
- Merge 2 arrays of objects
- Sort mixed alpha/numeric array
- How to change value of object which is inside an array using JavaScript or jQuery?
- Filter array of objects with another array of objects
- Using jQuery to compare two arrays of Javascript objects
- Merge Two Arrays so that the Values Alternate
- Generate unique number within range (0 – X), keeping a history to prevent duplicates
- How to Compare two Arrays are Equal using Javascript? [duplicate]
- Best way to convert string to array of object in javascript?
- Filter strings in Array based on content (filter search value)
- Convert html table to array in javascript
- Convert javascript array to string
- How to loop through array in jQuery?
- How to find the indexes of all occurrences of an element in array?
- How to get an Array with jQuery, multiple with the same name
- Convert js Array() to JSon object for use with JQuery .ajax
- How to find a value in an array of objects in JavaScript?
- Using jQuery inArray with array of JavaScript Objects
- How to flatten array in jQuery?
- javaScript: Can a comma occur after the last set of values in an array?
- How to put all elements’ content in array using jQuery ?