Find The Difference Of Two Arrays With JQuery

Posted by Weston Ganger

I came across this simple method using jQuery to get the difference of two arrays.

var array_one = [1,2,3,4];
var array_two = [3,4,5,6]

var difference = $(array_one).not(array_two).get();

// [1,2,5,6]

Short and Sweet!

Related External Links:

Article Topic:Software Development - Javascript

Date:March 23, 2016

Recommended Posts



Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected