I'm writing an API integration script and I get an array of objects back from the endpoint when I send my request. I also have a scripted search that gets an array of objects of matching NS records. I'd like to sort these into objects in the API response that have corresponding records in NS to update and ones that do not which need to be created.
What is a handy way to compare two arrays of objects and sort each object in the arrays into the correct category?