' Gambas module file

Function Convert(inputS As String, OutputS As String, CPUName As String)
 Dim JSON_FILE As Collection
 Dim z As Float
 Dim NEW_DB As Collection = [("DATABASE"): ""]
 Dim BUFFF As String
 Dim CPUDBINTEL As New Collection
 Dim CPUDBINTELADD As New Collection
 JSON_FILE = JSON.Decode(File.Load(inputS))
 CPUDBINTEL = JSON.Decode(File.Load("/etc/i-nex/Database/NULLD"))
 For z = 0 To JSON_FILE["DATABASE"].Count - 1
    If JSON_FILE["DATABASE"][z]["PROCESSOR_MODEL_NAME"] Like CPUName Then 
     Print JSON_FILE["DATABASE"][z]["PROCESSOR_MODEL_NAME"]
     Print CPUName
     Print z
     CPUDBINTEL["DATABASE"].Add(JSON_FILE["DATABASE"][z])
    Endif
 Next

 File.Save(OutputS, JSON.Encode(CPUDBINTEL))
 
End
