title: In Google Sheets, how to convert numbers to values, in an array, without breaking text?
body: <p>I need to sort an array taken from an API, by &quot;price&quot; and ascending <code>Col7</code>.</p>
  <p>Best way I could find is using formula below, but the text values break, and the headers disappear, because in order for the sorting of <code>Col7</code> to work well I had to force the whole array to number with <code>VALUE()</code>.</p>
  <pre><code>=QUERY(SORT(SORT(value(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),INDEX(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),0,7),FALSE),INDEX(SORT(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),INDEX(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),0,7),FALSE),0,7),FALSE),&quot;select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15 order by Col7 asc offset 0&quot;,0)
  </code></pre>
  <p>Here´s what happens:</p>
  <p><a href="https://i.stack.imgur.com/tR0fq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tR0fq.png" alt="enter image description here" /></a></p>
  <p>Prices are sorted like intended but all text is broken and header is gone.</p>
  <p>If I don´t use <code>VALUE()</code> the sorting does not work well and the Headers get thrown down below like this:</p>
  <p><a href="https://i.stack.imgur.com/XGPdL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XGPdL.png" alt="enter image description here" /></a></p>
  <p>This is the formula wthout the <code>VALUE()</code>:</p>
  <pre><code>=QUERY(SORT(SORT(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;),INDEX(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),0,7),FALSE),INDEX(SORT(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),INDEX(VALUE(ImportJSON(&quot;https://api-apollo.pegaxy.io/v1/pegas/prices/floor?maxBreedCount=7&amp;minBreedCount=0&amp;breedType=Legendary&amp;bloodLine=Hoz&quot;, &quot;/&quot;, &quot;&quot;)),0,7),FALSE),0,7),FALSE),&quot;select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14, Col15 order by Col7 asc offset 0&quot;,0)
  </code></pre>
  <p>Here is a dummy file:<br>
  <a href="https://docs.google.com/spreadsheets/d/1ExXtmQ8nyuV1o_UtabVJ-TifIbORItFMWjtN6ZlruWc/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1ExXtmQ8nyuV1o_UtabVJ-TifIbORItFMWjtN6ZlruWc/edit?usp=sharing</a></p>