// Build a results array by comparing ** uses lodash {{ results array }} = _.filter({{ orig array }}, item => { return _.isEqual({{ item to compare a }}, {{ to compare b }} ); }); // Build an array based on date var todayDate = new Date(); todayDate.setDate(new Date().getDate()); {{ results array}} = _.filter({{ orig array }}, item => { return _.isDate({{ valid date in UTC format }}) && {{ valid date in UTC format }} <= todayDate; });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter