Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove equal json js

array.filter((thing, index, self) =>
  index === self.findIndex((t) => (
    t.place === thing.place && t.name === thing.name // you can add more arguments here to filter more
  ))
)

//Other example
array.filter((thing, index, self) =>
  index === self.findIndex((t) => (
    t.place === thing.place && t.name === thing.name && t.time === thing.time
  ))
)
 
PREVIOUS NEXT
Tagged: #remove #equal #json #js
ADD COMMENT
Topic
Name
3+4 =