How to get access to the item API?

A response from the API:

_embedded: {
 items: [
{
 id: 402582,
 name: "402582",
 custom_fields: [
{
 id: 350969,
 name: "article",
 values: [
{
 value: "775977"
}
],
 is_system: true
},
{
 id: 355993,
 name: "Код1с",
 values: [
{
 value: "ЦБ000002162"
}
],
 is_system: false
},
],
}
]
}


The array turns out great, I am doing it FOR, and how do I get access to the custom_fields value to the id of the object?
March 12th 20 at 08:06
1 answer
March 12th 20 at 08:08
Solution
_embedded.items.forEach(function(item) {
 item.custom_fields.forEach(function(field) {
console.log(field);
});
});
Thank you.

But how can I access the value where id = 355993

test? if field.id == 355993 ?? - bell.Ort commented on March 12th 20 at 08:11
@bell.Ort, Yes - elouise_Anderson30 commented on March 12th 20 at 08:14
@elouise_Anderson30, Thank you. - bell.Ort commented on March 12th 20 at 08:17

Find more questions by tags APIJavaScript