title: How to find the maximum value in JSON array which also contains some JSON array
body: <p>Please find the below array JSON Object.</p>
  
  <pre><code>points:[{x:1, YValues:[34,45,56]}, {x:5, YValues:[20,12,30]}, {x:8, YValues:[12,13]}]
  </code></pre>
  
  <p>I want to find the maximum value of <code>X</code> and find the maximum value of <code>YValues</code> separately.</p>
  
  <p>I don't expect for loop to find the maximum value. Expecting in simple way to find the maximum of <code>X</code> as well as maximum of <code>YValues</code> from <code>points</code> JSON object.</p>
  
  <p>Is it possible to use <code>Math.max</code> or any custom function ?</p>
  
  <p>Thanks,
  Siva</p>