IBM Interview Question

Write a method to flatten and re-arrange a json structure.