I have a JSON file that has many instances like this..:
{
"SensorApp": "Open Hardware Monitor",
"SensorClass": "Temperature",
"SensorName": "Intel Core i7-4790: CPU Core #4",
"SensorValue": "31",
"SensorUnit": "C",
"SensorUpdateTime": 0
},
{
"SensorApp": "Open Hardware Monitor",
"SensorClass": "Temperature",
"SensorName": "Intel Core i7-4790: CPU Package",
"SensorValue": "32",
"SensorUnit": "C",
"SensorUpdateTime": 0
},
{
"SensorApp": "Open Hardware Monitor",
"SensorClass": "Clock",
"SensorName": "Intel Core i7-4790: CPU Core #1",
"SensorValue": "3899.165",
"SensorUnit": "MHz",
"SensorUpdateTime": 0
},
And so forth. I need to assign a variable, say var1 to the sensor value in:
{
"SensorApp": "Open Hardware Monitor",
"SensorClass": "Temperature",
"SensorName": "Intel Core i7-4790: CPU Package",
"SensorValue": "32",
"SensorUnit": "C",
"SensorUpdateTime": 0
},
I've tried a few questions already in stackoverflow, however none of them seem to work with multi-lined JSON files.
Any ideas how i can achieve this?