I have a table that looks like this:
ID Attributes Value
1 Name Jason
2 Age 14
3 Address 12 Test Road
A linq query has been created to select each value based on its ID
from p in db.people
where p.attributes.contains(string) || p.value.contains(string)
select p.attributes , p.value ,
Now, the challenge arises when displaying this data in JSON format in an MVC View. Each value is outputted in separate rows within individual div elements (which are incremented) using the following JavaScript code:
item.attributes + item.value
Current Output
Div 1
-------
Name - Jason
Div 2
--------
Age - 14
Div 3
---------
Address - 12 Test Road
Is there a way to have all these rows within a single div instead of separate div elements? Alternatively, is it possible to view the data as columns instead of rows?