In order to get the unique values from an array , there are many ways, through using Set , or filter() method on array values or other methods.
Here are some of the most important and userd array functions and methods in Javascript.
Pass current data id from anchor tag href to a button in a bootstrap modal - Example (delete confirmation modal)
If you have a data object that is json encoded and need to iterate through the inner data objcets here are different suggestions
If you need to call a resource on the server using the jquery ajax technique, here is an example