title: String interpolation in a large JSON string
body: <p>I am attempting to replace a variable in a large search string I will be using to call Elastic Search, but I can't seem to get the variable into the string.  Below is what I have attempted, using string interpolation to try and add <code>my_var</code> into the search string at 3 different places.</p>
  <pre><code>    my_var = &quot;foo&quot;
      
      search_string = '{&quot;query&quot;:{&quot;bool&quot;:{&quot;must&quot;:[{&quot;nested&quot;:{&quot;path&quot;:&quot;some_status&quot;, &quot;query&quot;:{&quot;bool&quot;:{&quot;must&quot;:{&quot;terms&quot;:{&quot;status.code&quot;:[&quot;ACTIVE&quot;]}}}}}}, {&quot;bool&quot;:{&quot;should&quot;:[{&quot;nested&quot;:{&quot;path&quot;:&quot;acc&quot;, &quot;query&quot;:{&quot;bool&quot;:{&quot;must&quot;:[{&quot;match_phrase&quot;:{&quot;acc.name.text&quot;:&quot;{#my_var}&quot;}}]}}}}, {&quot;bool&quot;:{&quot;must&quot;:[{&quot;match_phrase&quot;:{&quot;name.stuff&quot;:&quot;{#my_var}&quot;}}]}}, {&quot;nested&quot;:{&quot;path&quot;:&quot;trade_names&quot;, &quot;query&quot;:{&quot;bool&quot;:{&quot;must&quot;:[{&quot;match_phrase&quot;:{&quot;some_names.some_name.stuff&quot;:&quot;{#my_var}&quot;}}]}}}}]}}]}}}'
  
      JSON.parse(search_string)
  </code></pre>
  <p>What am I doing wrong here?</p>