A key array and values json

A, keys and values json array  https://blog.csdn.net/sinat_30224769/article/details/51702203

            string test_json = "[{\"name\":\"tom\",\"nickname\":\"tony\",\"sex\":\"male\",\"age\":20,\"email\":\"[email protected]\"},{\"name\":\"tom2\",\"nickname\":\"tony\",\"sex\":\"male\",\"age\":20,\"email\":\"[email protected]\"}]";

            dynamic c = JsonConvert.DeserializeObject(test_json);
            foreach (JObject o in c)
            {
                foreach (JToken child in o.Children())
                {
                    var property1 = child as JProperty;
                }
            }

 

Guess you like

Origin www.cnblogs.com/fger/p/12092344.html