code: public static List<Object[]> listKeyChains(final Object source) {
  
          List<Object[]> keyChainList = new LinkedList<>();
  
          if(source instanceof Map) {
              Map sourceMap = (Map) source;
              for (Object key: sourceMap.keySet()) {
                  keyChainList.addAll(listKeyChains(key, sourceMap.get(key)));
              }
          }
          else if(source instanceof List) {
              List sourceList = (List) source;
              for(int i=0; i<sourceList.size(); i++) {
                  keyChainList.addAll(listKeyChains(i, sourceList.get(i)));
              }
          }
          else {
              return Collections.emptyList();
          }
  
          return keyChainList;
      }
docs: Given a json document, finds out absolute path to every leaf element
  
  i.e. { "a": [ "x": { "y": "alpha" }], "b": { "p": [ "beta", "gamma" ], "q": {} }} will yield
  
  1) "a",0,"x","y" -> to "alpha"
  2) "b","p", 0 -> to "beta"
  3) "b", "p", 1 -> to "gamma"
  4) "b","q" -> to {} (empty Map)
  
  @param source json
  @return list of Object[] representing path to every leaf element