Skip to content

Instantly share code, notes, and snippets.

@xpqz
Created March 25, 2021 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xpqz/2cab73665d6bc4b20629a65275b4a62d to your computer and use it in GitHub Desktop.
Save xpqz/2cab73665d6bc4b20629a65275b4a62d to your computer and use it in GitHub Desktop.
Merge←{
templ←⎕JSON (⊃⎕NGET ⍺)
keys←templ.⎕NL¯2
vals←templ.(⍎¨#.keys)
(({'@',(⍕⍵),'@'}¨keys),(⊂'@@'),⊂'@[^@]+@')⎕R((⍕¨vals),(⊂,'@'),⊂'???')⊢⊃⎕NGET ⍵
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment