This sample gets an object's Argon.JProperty
collection using Argon.JObject.Properties
.
var o = new JObject
{
{"name1", "value1"},
{"name2", "value2"}
};
foreach (var property in o.Properties())
{
Console.WriteLine($"{property.Name} - {property.Value}");
}
// name1 - value1
// name2 - value2
foreach (var property in o)
{
Console.WriteLine($"{property.Key} - {property.Value}");
}
// name1 - value1
// name2 - value2