title: Extract product model from Linux commands or Python script
body: <p>I'm currently testing and gathering PCs' hardware information from the laptops that come from different vendors(Lenovo,Dell,HP...). I have my Linux Mint Live USB for this task.</p>
  
  <p>Right now, I want to get info of product line, product model from the json file generated from </p>
  
  <blockquote>
    <p>lshw command</p>
  </blockquote>
  
  <p>However, the result comes out in different ways.</p>
  
  <p>For example:
  Lenovo's Laptop:</p>
  
  <pre><code>{
    "id" : "mint",
    "class" : "system",
    "claimed" : true,
    "handle" : "DMI:000E",
    "description" : "Notebook",
    "product" : "2353ABU (LENOVO_MT_2353)",
    "vendor" : "LENOVO",
    "version" : "ThinkPad T430s",
    "serial" : "R9YC24W"
  }
  </code></pre>
  
  <p>product line will be <strong>ThinkPad</strong>, and product model will be <strong>T430s</strong></p>
  
  <p>In Dell:</p>
  
  <pre><code>{
    "id" : "mint",
    "class" : "system",
    "claimed" : true,
    "handle" : "DMI:000E",
    "description" : "Notebook",
    "product" : "Latitude E6400",
    "vendor" : "Dell Inc",
    "version" : "01",
    "serial" : "R9TQ24W"
  }
  </code></pre>
  
  <p>product line will be <strong>Latitude</strong> , and product model will be <strong>E6400</strong></p>
  
  <p>Same issue to HP:</p>
  
  <pre><code> {
        "id" : "mint",
        "class" : "system",
        "claimed" : true,
        "handle" : "DMI:000E",
        "description" : "Notebook",
        "product" : "HP EliteBook 8460p",
        "vendor" : "HP",
        "version" : "03",
        "serial" : "RGAGE14W"
      }
  </code></pre>
  
  <p>product line will be <strong>EliteBook</strong>  , and product model will be <strong>8460p</strong></p>
  
  <p>As you can see, the product line and model located in different node and sometimes come with different format. I'm trying to filter out the result and get the output from different kind of laptops</p>
  
  <p>my expected result:</p>
  
  <blockquote>
    <p>product line: "xxxx"</p>
    
    <p>product model: "xxxx"</p>
  </blockquote>
  
  <p>Is there any better approaches to perform such tasks?</p>
  
  <p>Thank you so much in advanced</p>