collect duplicates under 1 array #3963
Unanswered
achursin1986
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
seems very similar thing was asked here: Handling Duplicate keys in json #3392, I am just looking for some examples how to implement it via callback, in the old thread there were no examples provided unfortunately .
I have a file with example simple.json
./json-test
key "reachability-tlv" was already seen in this object!
key "reachability-tlv" was already seen in this object! <--- so we see this is not unique, just need to append contents to first found object in the same hierarchy, which is array
"reachability-tlv" : [
{ } { } { } + another reachability-tlv { } { } { } ... ]
Just to make clarity :
leaf [isis-tlv] can contain several [reachability-tlv] and I am trying to make them as one, no need to collapse reachability-tlv from another part of json , only local hierarchy
Thanks in advance !
p.s. full file is here https://file.io/eaHJnrmUMeuE
Beta Was this translation helpful? Give feedback.
All reactions