function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Removing a duplicate element from a JSON Array


I'm trying to figure out a way to dedupe JSON arrays based on the _prop.Invoice_Number__c value returned by a Remote Object retrieve. Please see attached screenshot of the JSON as viewed through a JSON editor to see the structure of the array.

I played around with lodash _uniq but with no success. Any pointers would be much appreciated.


User-added image
This should do what you want in lodash
_.values(_.indexBy(varaibleName, '_props.Invoice_Number__c'));