I have a base designed to track some packages shipped in a “Packages” table. Some of these packages may be linked to the same shipment, as signified by a “Shipment ID” field.
I’m working on creating a script that passes only unique shipment IDs to a “Shipments” table, so that I can link packages to their respective Shipment ID and roll up values from the “Packages” table for some further analysis.
Currently, with my script, I was either hoping to only put Unique IDs into an array, or, from an array I pass ALL the IDs into, create a second array that only captures the unique IDs, and with that, I can create records in the shipment table that I’ll link with either the same script or a different one.
The issue I’m having is that, when I use the output.inspect() or console.log() to view the array, the array displays as [Object, Object, Object, …] and when trying to pull only unique values, even though they might share unique values, it treats them all as distinct.
Any advice on this issue, whether it’s a different way to write this script or a work-around would be very helpful.