Hello, my array is given in the picture from which I want to find the unique value. Like ['round', 'marquees', 'princess', 'oval']
var array = [];
$.each(storeKeyValue, function (index, diamond) {
if (index == "shape") {
// console.log(diamond)
array.push(diamond);
$(".shapes").append('<option value="' + diamond + '">' + diamond + "</option>");
} else if (index == "color") {
// console.log(diamond)
$(".colors").append('<option value="' + diamond + '">' + diamond + "</option>");
} else if (index == "quality") {
// console.log(diamond)
$(".quality").append('<option value="' + diamond + '">' + diamond + "</option>");
}
});
console.log(array);
$(document).ready(function () {
$(document).on("change", ".shapes", function (e) {
var shape = $(this).val();
if (storeKeyValue.shape === shape) {
$.each(storeKeyValue, function (index, size) {
if (index == "size") {
$(this).siblings(".size_diamond").empty();
$(".size").append('<option value="' + size + '">' + size + "</option>");
}
});
}
});
});