Example needed
vanillamasonry opened this issue · 2 comments
vanillamasonry commented
Example needed
Unclear how to get / iterate a dictionary
ex: JSONDoc.Root.Values['test'].IsDictionary= true
How to iterate this dictionary ... there is no method such as
for Key in Dictionary.Keys do
neslib commented
You can use the TJsonValue.Elements
property for this. This is an array property that can be used to enumerate all key/value pairs in the dictionary:
for var I := 0 to MyJsonValue.Count - 1 do
begin
var Element := MyJsonValue.Elements[I];
// Element.Name is the key
// Element.Value is the value
end
Let me know if this answers your question.
vanillamasonry commented
Erick -> Thank you very much