title: Parse json arrays using HIVE
body: <p>I have many json arrays stored in a table (jt) that looks like this: </p>
  
  <pre><code>[{"ts":1403781896,"id":14,"log":"show"},{"ts":1403781896,"id":14,"log":"start"}]
  [{"ts":1403781911,"id":14,"log":"press"},{"ts":1403781911,"id":14,"log":"press"}]
  </code></pre>
  
  <p>Each array is a record.</p>
  
  <p>I would like to parse this table in order to get a new table (logs) with 3 fields: ts, id, log.
  I tried to use the get_json_object method, but it seems that method is not compatible with json arrays because I only get null values.</p>
  
  <p>This is the code I have tested:</p>
  
  <pre><code>CREATE TABLE logs AS 
  SELECT get_json_object(jt.value, '$.ts') AS ts, 
  get_json_object(jt.value, '$.id') AS id,
  get_json_object(jt.value, '$.log') AS log
  FROM jt;
  </code></pre>
  
  <p>I tried to use other functions but they seem really complicated. 
  Thank you! :)</p>
  
  <p>Update!
  I solved my issue by performing a regexp:</p>
  
  <pre><code>CREATE TABLE jt_reg AS
  select regexp_replace(regexp_replace(value,'\\}\\,\\{','\\}\\\n\\{'),'\\[|\\]','') as valuereg  from jt;
  
  
  CREATE TABLE logs AS 
  SELECT get_json_object(jt_reg.valuereg, '$.ts') AS ts, 
  get_json_object(jt_reg.valuereg, '$.id') AS id,
  get_json_object(jt_reg.valuereg, '$.log') AS log
  FROM ams_json_reg;
  </code></pre>