title: How I can sort list of JObject (Scala, json4s)
body: <p>I read a JSON file and use json4s to parse JSON.</p>
  <p>How I can sort an array of JObject that I read from the file?</p>
  <pre><code>package org.example
  
  import org.json4s._
  import org.json4s.native.JsonMethods._
  
  object Main extends App {
    val file = scala.io.Source.fromURL(&quot;https://raw.githubusercontent.com/mledoze/countries/master/countries.json&quot;)
    val text = file.mkString
  
    val json = parse(text)
  
    val countries = json.children
  
    countries.sortBy(...)
  
  }
  </code></pre>
  <p>Each country has a field &quot;area&quot; and I need to sort the list by this field.
  I don't know how to use sortBy in this situation because the country is not just an object of some class. This is JObject and the field &quot;area&quot; has a type JInt.</p>
  <p>Can you help me? Or maybe do you know other solution?</p>