H Team, Am trying to fetch the nicSwitch* details of only corresponding nicName from the below json data, which i could not able to achieve. Help is appreciated! raw json data to extract the netwo...
See more...
H Team, Am trying to fetch the nicSwitch* details of only corresponding nicName from the below json data, which i could not able to achieve. Help is appreciated! raw json data to extract the network switch details of each nicName { "hostname": "abc", "inventory": "#####", "fqdn": "xxxxx.xxxx.xxx.xxx.xxx", "ip": "#.#.#.#", "platform": "XXXXX", "version": "XXXXX", "environment": "XXXX", "status": "XXXXX", "subStatus": "XXXXX", "contactSupporTeam": "xxxx", "model": "XXXXX", "product": "SERVER", "serial": "dfd34324", "app": [{ "appName": "XXXXX", "appAcronym": "XXX", "appStatus": "xxxxx", "appOwner": "xxxxxx" }], "pkg": [{ "pkgName": "xxxxx", "pkgVersion": "1.2.3" }, { "pkgName": "yyyyy", "pkgVersion": "2.3.4" }, { "pkgName": "zzzzz", "pkgVersion": "3.4.5" }], "nic": [{ "nicName": "eth4", "nicSwitch": [{ "nicSwitchName": "xxxxxxx", "nicSwitchSerial": "dfgdg45435fgg", "nicSwitchManufacturer": "XXXX", "nicSwitchModel": "XXX22", "nicSwitchVlan": "Vlan###", "nicSwitchChannel": "port-channel3", "nicSwitchPort": "Ethernet107/1/7" }, { "nicSwitchName": "xxxxxxxx", "nicSwitchSerial": "dfsf23432ef", "nicSwitchManufacturer": "XXXX", "nicSwitchModel": "XXXX", "nicSwitchChannel": "port-channel3", "nicSwitchPort": "Ethernet107/1/8", "nicSwitchVlan": "Vlan###" }], "nicDnsName": "", "nicType": null, "nicStatus": "up", "nicSpeed": "10000", "nicFirmware": "", "nicMac": "XX##XXX###XX", "nicDuplex": "FULL", "nicIP": "undefined", "nicNetmask": "" }, { "nicName": "eth5", "nicSwitch": [{ "nicSwitchName": "xxxxxx", "nicSwitchSerial": "dsfsdf3432sdf", "nicSwitchManufacturer": "XXXX", "nicSwitchModel": "XXXXX", "nicSwitchChannel": "port-channel3", "nicSwitchVlan": "Vlan###", "nicSwitchPort": "Ethernet107/1/8" }, { "nicSwitchName": "xxxxxx", "nicSwitchSerial": "fdf345345", "nicSwitchManufacturer": "XXXXX", "nicSwitchModel": "XXXXX", "nicSwitchChannel": "port-channel3", "nicSwitchPort": "Ethernet107/1/7", "nicSwitchVlan": "Vlan###" }], "nicDnsName": "", "nicType": null, "nicStatus": "up", "nicSpeed": "", "nicFirmware": "", "nicMac": "XXX###XXX", "nicDuplex": "", "nicIP": "undefined", "nicNetmask": "" }, { "nicName": "eth6", "nicSwitch": [], "nicDnsName": "", "nicType": null, "nicStatus": "", "nicSpeed": "", "nicFirmware": "", "nicMac": "", "nicDuplex": "", "nicIP": "#.#.#.#", "nicNetmask": "#.#.#.#" }] }