Shoaib Ahmed

Shoaib Ahmed

  • 1.9k
  • 187
  • 2.6k

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)