Shoaib Ahmed

Shoaib Ahmed

  • NA
  • 189
  • 5.3k

How to add value to array of object within foreach

Jan 9 2019 4:01 AM
@foreach (var QuestionAnswers in Model)
{
var markers = [
{
coords: { lat: @QuestionAnswers.latitude, lng: @QuestionAnswers.longitude},
},
];
 
}
How can I add value within foreach loop? 

Answers (2)