Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Dictionary Keys in JsonDynamicObject #16013

Closed
wants to merge 2 commits into from

Conversation

MikeAlhayek
Copy link
Member

We need a way to be able to iterate over the keys in the JsonDynamicObject. Exposing the Keys will allow us to do something like this

foreach(var key in dyanmicObj.Keys)
{
      var value = dyanmicObj.GetValue(key);
}

@MikeAlhayek MikeAlhayek requested a review from hishamco May 7, 2024 23:48
@MikeAlhayek
Copy link
Member Author

Use GetDynamicMemberNames() instead

@MikeAlhayek MikeAlhayek closed this May 8, 2024
@hishamco hishamco deleted the ma/DynamicJsonConverter branch May 8, 2024 00:21
@gvkries
Copy link
Contributor

gvkries commented May 8, 2024

GetDynamicMemberNames is for debugging only, when you need the keys you should use the JsonObject directly IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants