2
How do I add items from a IEnumerable<T> in an array JavaScript?
View:
@using Colecao.ViewModels
@model ConfiguracoesViewModel
@foreach (var equipamento in @Model.Equipamentos)
{
//Gostaria de adicionar esses itens em um array JS.
}
In Javascript there is no
IEnumerable...– Sergio
You’re confused to understand. You want to pass one
IEnumerablean Action for your JS? OrIEnumerableis on your JS?– Filipe Oliveira
I pass the Ienumerable to the view! and in the JS I would like to manipulate the items of Ienumerable ,adding in an array .
– Hans Miller
@Hansmiller how are you going to view? you can put the code or how it appears in the view?
– Sergio
I get it, do you have any code made? This can help to better understand what you have and the staff help you in the best way. If so, click on [Edit] and add these details.
– Filipe Oliveira