Accessing inner node by reference #3940
Unanswered
yoav-spring
asked this question in
Q&A
Replies: 1 comment 5 replies
-
at should work as it returns a reference. Can you please share your code? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a JSON document d where an inner node contains counters I need to add / increment, e.g.:
I would like to initialize and maintain a reference
counters
to d["MyComponent"]["Counters"] that I can read but also write to, affecting d. I tried accessing the counters map using at(), but writing to it didn't change the original document.Is there a way to achieve that?
Beta Was this translation helpful? Give feedback.
All reactions