You're returning an array containing the value of every column from every row, flattened out into a single list. You need to return an array of objects instead:
while (reader.Read())
{
columnNames.Add(new
{
rownum = (Int64)reader["rownum"],
code = (Int32)reader["code"],
arabicCaption = (string)reader["ArabicCaption"],
columnName = (string)reader["COLUMN_Name"],
tableName = (string)reader["TableName"]
});
}
The returned data will look something like:
[
{
rownum: 1,
code: 1,
arabicCaption: "كود الموظف",
columnName: "EmployeeId",
tableName: "Employees"
},
{
rownum: 2,
code: 2,
arabicCaption: "الفرع",
columnName: "BranchCode",
tableName: "Employees"
},
{
rownum: 3,
code: 3,
arabicCaption: "الاسم",
columnName: "EmployeeName",
tableName: "Employees"
}
]