title: extracting field from JSON using HIVE
body: <p>I have one issue in my hive code. I want to extract JSON data from using HIVE.Following is the sample json format</p>
  
  <pre><code>{"Rtype":{"ver":"1","os":"ms","type":"ns","vehicle":"Mh-3412","MOD":{"Version":[{"versionModified"{"machine":"123.dfer","founder":"3.0","state":"Florida","fashion":"fg45","cdc":"new","dof":"yes","ts":"2000-04-01T00:00:00.171Z"}}]}}}
  </code></pre>
  
  <p>I want to get the following fields</p>
  
  <ul>
  <li>ver</li>
  <li>type </li>
  <li>vehicle</li>
  <li>ts </li>
  <li>founder</li>
  <li>state </li>
  </ul>
  
  <p>the issue is founder and state is in one array "version"
  can anybody help how to get rid of this?
  some times instead of versionmedified   something else may come</p>
  
  <p><strong>eg:</strong>
  some times my data will be like     </p>
  
  <pre><code>{"Rtype":{"ver":"1","os":"ms","type":"ns","vehicle":"Mh-3412","MOD":{"Version":[{"anotherCriteria":{"engine":"123.dfer","developer":"3.0","state":"Florida","fashion":"fg45","cdc":"new","dof":"yes","ts":"2000-04-01T00:00:00.171Z"}}]}}}
  </code></pre>
  
  <p>adding  some sample data below:</p>
  
  <pre><code>{"Rtype":{"ver":"1","os":"ms","type":"ns","vehicle":"Mh-3412","MOD":{"Version":[{"ABC"{"XYZ":"123.dfer","founder":"3.0","GHT":"Florida","fashion":"fg45","cdc":"new","dof":"yes","ts":"2000-04-01T00:00:00.171Z"}}]}}}
  
  
  {"Rtype":{"ver":"1","os":"ms","type":"ns","vehicle":"Mh-3412","MOD":{"Version":[{"GAP"{"XVY":"123.dfer","FAH":"3.0","GHT":"Florida","fashion":"fg45","cdc":"new","dof":"yes","ts":"2000-04-01T00:00:00.171Z"}}]}}}
  
  
  {"Rtype":{"ver":"1","os":"ms","type":"ns","vehicle":"Mh-3412","MOD":{"Version":[{"BOX"{"VOG":"123.dfer","FAH":"3.0","FAX":"Florida","fashion":"fg45","cdc":"new","dof":"yes","ts":"2000-04-01T00:00:00.171Z"}}]}}}
  </code></pre>
  
  <p>i need to put this data into various tables based on version if it is "BOX" the put in one table if it is "GAP" put another...</p>