So you want to access the value of a key-value pair inside a dictionary, inside a dictionary, inside a list, inside a dictionary?
It sounds like you want this:
_score = ht["data"][0]["score"].ToString();
Note, the 0
here represents the first item in the ht["data"]
list.
Unfortunately it looks like your objects are probably weakly typed. In that case you'd have to do:
_score =
((IDictionary<string, object>)
((IList<object>)ht["data"])[0])["score"].ToString();
Which looks terrible, but should work (assume the types returned are really what you describe).
To get an set of user name / score pairs, you can use something like this Linq query:
var scores =
from item in ((IList<object>)ht["data"]).Cast<IDictionary<string, object>>()
let name = ((IDictionary<string, object>)item["user"])["name"].ToString()
let score = item["score"].ToString()
select new { username = name, score };