Answer the question
In order to leave comments, you need to log in
How to iterate over a multidimensional array in jQuery?
I have an array like this:
[
{
'variation_id':32961,
'attributes':{'attribute_razmer':'72', 'attribute_tsvet':'черный'},
'is_in_stock':false
},
{
'variation_id':32931,
'attributes':{'attribute_razmer':'70', 'attribute_tsvet':'черный'},
'is_in_stock':true
}
]
Answer the question
In order to leave comments, you need to log in
If I understand the task correctly, you can use Array.filter(function(element){ ... }) We
check the attributes, if everything fits, we return true.
https://jsfiddle.net/jbd62qzz/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question