0
Hello, how to check if all items "estoqueLevel
" has the same value ("0" in the case).
$.each(JSON.parse(response), function (i, modosEntrega) {
for (var i in modosEntrega) {
var foraEstoque = modosEntrega[i].estoqueLevel;
$(foraEstoque).each(function () {
if(foraEstoque == "0") {
$('.class').remove();
}
});
}
});
json:
{"modosEntrega":[
{
"nome" : "MO00002000",
"dias" : "2",
"preco" : "R$ 11,00",
"estoqueLevel" : "0"
},
{
"name" : "5003",
"dias" : "7",
"preco" : "R$ 2,20",
"estoqueLevel" : "0"
}
]}
present html and json
– Leandro Angelo