// Flattening JSON Objects // (want to merge all keys as a string from nested hash and want out put in array list)
input1 = {a: {b: {c: {} }, d:[] }, e: "e", f: nil, g: -2}
input2 = {a: {b: {c: {h: {j: ''}, m: {n: ''}}}, d: {k: {l: '' } }},e: "e",f: nil,g: -2}
// expected output for above input, should be an array with all these keys in any order
output1 = ["g", "f", "e", "a.b.c", "a.d"]
output2 = ["a.b.c.h.j", "a.b.c.m.n", "a.d.k.l", "e", "f", "g"]