title: How to convert a map[string]interface{} to string
body: <p>I'm trying to get the path to value from a json file: </p>
  
  <p>for example : </p>
  
  <pre><code>x: 4
  z:
    y: 6
    t: 8
  a:
    b:
      p: 0
  m:
    c : 4 
  </code></pre>
  
  <p>the output that i want is : </p>
  
  <p>x=4, z.y=6, z.t=8, a.b.p=0, m.c=4 </p>
  
  <p>i wrote a functions below : </p>
  
  <pre><code>func parsecustom(aMap map[string]interface{}) (string, string) {
  
      var sol string
      var k string
      for key, val := range aMap {
          switch concreteVal := val.(type) {
          case map[string]interface{}:
              x, _ := parseMap(val.(map[string]interface{}))
              sol = key + "." + x
              k += sol + ","
          case string:
              sol = key + "=" + concreteVal + " "
              k += sol + ","
          case float64:
              sol = key + "=" + strconv.FormatFloat(concreteVal, 'f', -1, 64) + " "
              k+= sol + ","
          default:
              k = " "
  
          }
      }
  
  return sol, TrimSuffix(k, ",")
  }
  </code></pre>
  
  <p>but it didn't take into account this case : </p>
  
  <pre><code>z:
    y: 6
    t: 8
  </code></pre>
  
  <p>it override, it print only z.t=8 and ignore z.y=6</p>
  
  <p>Any hints please how to solve this problem </p>