var indexedResult = result
.Select((item, index) =>
{
IDictionary<string, object> dict = (IDictionary<string, object>)new ExpandoObject();
foreach (var prop in (IDictionary<string, object>)item)
{
dict[prop.Key] = prop.Value;
}
dict["Index"] = index + 1; // 1부터 시작하는 인덱스
return (dynamic)dict;
})
.ToList();
카테고리 없음