Your problem seems to lie here:
object myobject=js.DeserializeObject(json);
Does this method return an
object
? Or does it return a
Dictionary<string,object>
? If it returns an object, then you need to convert that object into a Dictionary, so that you can iterate the collection using ForEach. Otherwise you need to declare the result of the method as a Dictionary and not an object.
Hope this helps