My Full JSON from second API.
"ID": "DS104930",
"Type": "Driver",
"Released": "2019-04-01T07:10:00Z",
"Updated": "2019-04-08T05:58:44Z",
"OperatingSystems": [
"Windows 10 (64-bit)",
"Windows 8.1 (64-bit)"
],
"Categories": [
"BIOS/UEFI"
],
"Title": "BIOS Update Utility for Windows 10 (64-bit), 8.1 (64-bit) - ThinkPad 10 (Type 20E3, 20E4)",
"Summary": "This package updates the UEFI BIOS stored in the ThinkPad computer to fix problems, add new functions, or expand functions",
"Body": "<p>This package updates the UEFI BIOS stored in the ThinkPad computer to fix problems, add new functions, or expand functions.</p>\n\n<h3>Supported Systems</h3>\n\n<ul>\n\t<li>ThinkPad 10 (Type 20E3, 20E4)</li>\n</ul>\n\n<h3>Supported Operating Systems</h3>\n\n<ul>\n\t<li>Microsoft Windows 10 64-bit</li>\n\t<li>Microsoft Windows 8.1 64-bit</li>\n</ul>\n\n<h3>Additional Information</h3>\n\n<p>Please refer to the README file for the following:</p>\n\n<ul>\n\t<li>Installation Instructions</li>\n\t<li>Determining Which Version is Installed</li>\n\t<li>Complete list of summary of changes</li>\n\t<li>Known limitations (if any)</li>\n</ul>\n\n<table width=\"100%\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<th>Package</th>\n\t\t\t<th>BIOS</th>\n\t\t\t<th>ECP</th>\n\t\t\t<th>Release</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.23</td>\n\t\t\t<td>2.23 (N1AETC3W)</td>\n\t\t\t<td>2.23 (N1AHTC3W)</td>\n\t\t\t<td>Current release</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.22</td>\n\t\t\t<td>2.22 (N1AETC2W)</td>\n\t\t\t<td>2.22 (N1AHTC2W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj26w.exe\">n1auj26w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj26w.txt\">n1auj26w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.21</td>\n\t\t\t<td>2.21 (N1AETC1W)</td>\n\t\t\t<td>2.21 (N1AHTC1W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj25w.exe\">n1auj25w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj25w.txt\">n1auj25w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.19</td>\n\t\t\t<td>2.19 (N1AETB9W)</td>\n\t\t\t<td>2.19 (N1AHTB9W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj24w.exe\">n1auj24w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj24w.txt\">n1auj24w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.18</td>\n\t\t\t<td>2.18 (N1AETB8W)</td>\n\t\t\t<td>2.18 (N1AHTB8W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj23w.exe\">n1auj23w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj23w.txt\">n1auj23w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.17</td>\n\t\t\t<td>2.17 (N1AETB7W)</td>\n\t\t\t<td>2.17 (N1AHTB7W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj22w.exe\">n1auj22w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj22w.txt\">n1auj22w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.16</td>\n\t\t\t<td>2.16 (N1AETB6W)</td>\n\t\t\t<td>2.16 (N1AHTB6W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj21w.exe\">n1auj21w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj21w.txt\">n1auj21w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.14</td>\n\t\t\t<td>2.13 (N1AETB4W)</td>\n\t\t\t<td>2.14 (N1AHTB4W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj20w.exe\">n1auj20w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj20w.txt\">n1auj20w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.13</td>\n\t\t\t<td>2.13 (N1AETB3W)</td>\n\t\t\t<td>2.13 (N1AHTB3W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj19w.exe\">n1auj19w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj19w.txt\">n1auj19w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.12</td>\n\t\t\t<td>2.12(N1AETB2W)</td>\n\t\t\t<td>2.12(N1AHTB2W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj18w.exe\">n1auj18w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj18w.txt\">n1auj18w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.10</td>\n\t\t\t<td>2.10(N1AETB0W)</td>\n\t\t\t<td>2.10(N1AHTB0W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj17w.exe\">n1auj17w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj17w.txt\">n1auj17w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.08</td>\n\t\t\t<td>2.08(N1AETA8W)</td>\n\t\t\t<td>2.08(N1AHTA8W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj16w.exe\">n1auj16w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj16w.txt\">n1auj16w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>2.03</td>\n\t\t\t<td>2.03(N1AETA3W)</td>\n\t\t\t<td>2.03(N1AHTA3W)</td>\n\t\t\t<td>Not released to the web</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.97</td>\n\t\t\t<td>1.97(N1AET97W)</td>\n\t\t\t<td>1.97(N1AHT97W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj14w.exe\">n1auj14w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj14w.txt\">n1auj14w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.96</td>\n\t\t\t<td>1.96(N1AET96W)</td>\n\t\t\t<td>1.96(N1AHT96W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj13w.exe\">n1auj13w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj13w.txt\">n1auj13w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.95</td>\n\t\t\t<td>1.95(N1AET95W)</td>\n\t\t\t<td>1.95(N1AHT95W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj12w.exe\">n1auj12w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj12w.txt\">n1auj12w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.83</td>\n\t\t\t<td>1.81(N1AET83W)</td>\n\t\t\t<td>1.83(N1AHT83W)</td>\n\t\t\t<td>Not released to the web</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.81</td>\n\t\t\t<td>1.81(N1AET81W)</td>\n\t\t\t<td>1.81(N1AHT81W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj06w.exe\">n1auj06w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj06w.txt\">n1auj06w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.80</td>\n\t\t\t<td>1.80(N1AET80W)</td>\n\t\t\t<td>1.80(N1AHT80W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj05w.exe\">n1auj05w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj05w.txt\">n1auj05w.txt</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>1.64</td>\n\t\t\t<td>1.64(N1AET64W)</td>\n\t\t\t<td>1.64(N1AHT64W)</td>\n\t\t\t<td><a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj03w.exe\">n1auj03w.exe</a><br />\n\t\t\t<a href=\"https://download.lenovo.com/pccbbs/mobiles/n1auj03w.txt\">n1auj03w.txt</a></td>\n\t\t</tr>\n\t</tbody>\n</table>\n<div id=\"divauto-tranmt\" data-mt=\"0\" style=\"display:none; \"></div>",
"Files": [
{
"Title": "README",
"Version": "2.23",
"Size": "17 KB",
"Priority": "Recommended",
"Type": "TXT README",
"OperatingSystems": [
"Windows 10 (64-bit)",
"Windows 8.1 (64-bit)"
],
"URL": "https://download.lenovo.com/pccbbs/mobiles/n1auj27w.txt",
"MD5": "2046cd690e255ce02827e3e825f9f921",
"SHA1": "d856d01ea4b7326e97ebd057c27c83908ebe8b12",
"SHA256": "a5d4cd69bd858294bd4a3eca0891b228aef5ad9123bfa32004fa4569b49ff7b6"
},
{
"Title": "BIOS Update Utility",
"Version": "2.23",
"Size": "4.8 MB",
"Priority": "Recommended",
"Type": "EXE",
"OperatingSystems": [
"Windows 10 (64-bit)",
"Windows 8.1 (64-bit)"
],
"URL": "https://download.lenovo.com/pccbbs/mobiles/n1auj27w.exe",
"MD5": "f84f897dde04a3e7cf4ed68f38635700",
"SHA1": "f3326e7dfe666cc65bdf3d3342cb2a34a816ab0d",
"SHA256": "0ef73faf2250f78a202786b7606f2742f77029ecae9119543f5e4b434eff4721"
}
]
From this JSON I need to use just :
"Files": [
{
"Version": "2.23",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/n1auj27w.exe",
},
My API JSON looks like this:
{id: 1, name: "10", mtm: "20E3, 20E4", biosVersion: "2.22", lBiosid: "DS104930"}
When I run Dariusz code just receive full second API JSON:
0: {ID: "DS104930", Type: "Driver", Released: "2019-04-01T07:10:00Z", Updated: "2019-04-08T05:58:44Z", OperatingSystems: Array(2), …}
1: {ID: "DS041804", Type: "Driver", Released: "2019-03-28T00:00:00Z", Updated: "2019-04-03T02:55:55Z", OperatingSystems: Array(2), …}
2: {ID: "DS041534", Type: "Driver", Released: "2019-03-20T00:00:00Z", Updated: "2019-04-03T03:06:13Z", OperatingSystems: Array(2), …}
3: {ID: "DS041529", Type: "Driver", Released: "2018-12-11T16:53:00Z", Updated: "2018-12-17T03:16:24Z", OperatingSystems: Array(3), …}
4: {ID: "DS112170", Type: "Driver", Released: "2019-02-01T05:04:00Z", Updated: "2019-04-04T06:28:25Z", OperatingSystems: Array(3), …}
I need to receive something like this:
{
"id": 1,
"name": "10",
"mtm": "20E3, 20E4",
"biosVersion": "2.22",
"lBiosid": "DS104930",
"Files": [
{
"Version": "2.23",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/n1auj27w.exe",
},
},
{
"id": 2,
"name": "10",
"mtm": "20C1,20C3",
"biosVersion": "1.47",
"lBiosid": "DS041804",
"Files": [
{
"Version": "x.xx",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/xxxxxx.exe",
},
},
{
"id": 3,
"name": "10 x 32",
"mtm": "20C1,20C3",
"biosVersion": "1.84",
"lBiosid": "DS041534",
"Files": [
{
"Version": "x.xx",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/xxxxxx.exe",
},
},
{
"id": 4,
"name": "11e",
"mtm": "20D9,20DA",
"biosVersion": "1.35",
"lBiosid": "DS041529","Files": [
{
"Version": "x.xx",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/xxxxxx.exe",
},
},
{
"id": 5,
"name": "11e 3rd Gen, Yoga 11e 3rd Gen ",
"mtm": "20G9,20GB, 20G8, 20GA",
"biosVersion": "1.20/1.24",
"lBiosid": "DS112170",
"Files": [
{
"Version": "x.xx",
"Type": "EXE",
"URL": "https://download.lenovo.com/pccbbs/mobiles/xxxxxx.exe",
},
Thank you for help.