I'm stuck in a block of code, I'm attempting to pass an object to a chart, the actual data is being send as {shop: 'xyz', total: 20}
, but the chart queries only {'xyz', 20}
, thing is, the data is coming from a query in my database, which returns me those 2 values
List<Object> list = new List<Object>();
while (resSCIPA.Read())
{
object shopping = resSCIPA["shopping"];
object total = resSCIPA["total"];
var item = new
{
shopping,
total
};
list.Add(item);
}
SerieDataListModel seriesAll = new SerieDataListModel()
{
name = "Preventiva",
data = list
};
the list
is going to receive {'xyz', 20}
, how can I achieve this info from my actual loop?