title: How to find the length of hive json array field using hive query
body: <pre><code>&quot;keys&quot;: [ &quot;2324&quot;, &quot;abc&quot;] 
  </code></pre>
  <p>This is one of the key of hive JSON. I want to find the length of the <code>&quot;keys&quot;</code> field. i am reading the JSON using <code>get_json_object()</code> method.</p>
  <p>This is the way I am doing but getting error:</p>
  <pre><code>select count(*) from table_name where json_array_length(get_json_object(node,'$.keys'))=2;
  </code></pre>