Created
July 26, 2017 08:02
-
-
Save Zetzumarshen/0a5989b46b5043f2d8f6507beef9c467 to your computer and use it in GitHub Desktop.
Filter unique object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var key in responseData) { | |
// unique nominal_tarif | |
var compareKodeMataAnggaran = null; | |
responseData[key] = responseData[key].filter(function(value){ | |
if( compareKodeMataAnggaran != value.kode_mata_anggaran){ | |
compareTarif = value.nominal_tarif; | |
return true; | |
} | |
}); | |
} | |
factory.data = responseData; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment