title: How do I create this this JSON object?
body: <pre><code>{
    "query": {
      "query_string": {
        "query": "&lt;query string&gt;"
      }
    }
  }
  </code></pre>
  
  <p>The API I'm using requires that I send my queries in this format. I've been trying to find a way to to create this using maps but I keep getting errors and haven't been able to find any solutions online. </p>
  
  <p>Edit: I found a way to do it, is there a better way?</p>
  
  <pre><code>    test := map[string]map[string]map[string]string {
          "query": map[string]map[string]string {
              "query_string": map[string]string{
                  "query": query,
               },
          },
      }
  </code></pre>