I am writing an unit test for a mvc web application that checks if a returned list of anonymous variables(in a jsonresult) is correct. therefore i need to iterate through that list but i cannot seem to find a way to do so.
so i have 2 methods
1) returns a json result . In that json result there is a property called data. that property is of type object but internally it's a list of anonymous variables
2) the method calls method 1 and checks if the returned jsonresult is ok.
if i run the test and i break the debugger i can hover over the result and see the items in it. i just don't find a way to do so in code.(just using a foreach isn't possible because at the point i need it i'm not in the method that created the anonymous method)