Answer the question
In order to leave comments, you need to log in
How to loop through a JS array?
Please tell me how to iterate over an array of the form using js or jquery:
Array
(
[0] => Array
(
[id] => 45
[description] => 11231
[status] => 1
)
[1] => Array
(
[id] => 44
[description] => блабла
[status] => 1
)
)
Answer the question
In order to leave comments, you need to log in
const array = [
{
id: 44,
},
{
id: 45,
},
];
for (const item of array) {
console.log(item.id);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question