Reputation: 824
I am trying to store the values of a deserialized object in the database. My deserialized object is according to the image I uploaded.
I tried to implement IEnumerable
and IEnumerator
interfaces so that I can make my class foreach accessible.
public class Result:IEnumerable,IEnumerator
But then there is exception coming with my deserialization process.
Upvotes: 1
Views: 181
Reputation: 1039368
You could loop through the Result.data
property which is a collection:
Result soap = JsonConvert.DeserializeObject<Result>(ser);
foreach (var item in soap.data)
{
... do something with each element of the data collection
}
Upvotes: 2