Title: Support Question: Unable to extract data from JSON file · Issue #11140 · PowerShell/PowerShell · GitHub
Open Graph Title: Support Question: Unable to extract data from JSON file · Issue #11140 · PowerShell/PowerShell
X Title: Support Question: Unable to extract data from JSON file · Issue #11140 · PowerShell/PowerShell
Description: Support Question I've got a JSON file in this format: [ { "SensorApp": "HWiNFO", "SensorClass": "System: DELL XPS 13 9380", "SensorName": "Virtual Memory Commited", "SensorValue": "7286", "SensorUnit": "MB", "SensorUpdateTime": 157403168...
Open Graph Description: Support Question I've got a JSON file in this format: [ { "SensorApp": "HWiNFO", "SensorClass": "System: DELL XPS 13 9380", "SensorName": "Virtual Memory Commited", "SensorValue": "7286", "SensorUn...
X Description: Support Question I've got a JSON file in this format: [ { "SensorApp": "HWiNFO", "SensorClass": "System: DELL XPS 13 9380", "SensorName": "...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11140
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support Question: Unable to extract data from JSON file","articleBody":"# Support Question\r\n\r\nI've got a JSON file in this format:\r\n[\r\n {\r\n \"SensorApp\": \"HWiNFO\",\r\n \"SensorClass\": \"System: DELL XPS 13 9380\",\r\n \"SensorName\": \"Virtual Memory Commited\",\r\n \"SensorValue\": \"7286\",\r\n \"SensorUnit\": \"MB\",\r\n \"SensorUpdateTime\": 1574031681\r\n },\r\n {\r\n \"SensorApp\": \"HWiNFO\",\r\n \"SensorClass\": \"System: DELL XPS 13 9380\",\r\n \"SensorName\": \"Virtual Memory Available\",\r\n \"SensorValue\": \"1926\",\r\n \"SensorUnit\": \"MB\",\r\n \"SensorUpdateTime\": 1574031681\r\n },\r\n {\r\n \"SensorApp\": \"HWiNFO\",\r\n \"SensorClass\": \"System: DELL XPS 13 9380\",\r\n \"SensorName\": \"Virtual Memory Load\",\r\n \"SensorValue\": \"79\",\r\n \"SensorUnit\": \"%\",\r\n \"SensorUpdateTime\": 1574031681\r\n }\r\n]\r\n\r\nYet every time I convertfrom-JSON and try to get data out (In this case, trying to get temperature info from HWiNFO64), it returns as empty. I can format as a table and see all the data, however nothing I do seems to be able to parse the content of the file and return a value.\r\n\r\nSo my question here is how do I go about getting information (Say in this case, I want to find anything with sensorname -like tjmax and then return the sensorvalue from that object)\r\n\r\nAny suggestions welcome. For reference I'd consider myself competent but not an expert. I'm really hoping there's an easy obvious way to do this that I just missed.\r\n\r\n[192.168.66.38.txt](https://github.com/PowerShell/PowerShell/files/3872103/192.168.66.38.txt)\r\n\r\n\r\n## Official support\r\n\r\n[PowerShell Support Lifecycle](https://aka.ms/pslifecycle)\r\n\r\n## Community Resources\r\n\r\n[Slack][powershell-slack] and [Discord][powershell-discord] Community Chat - Interactive chat with other PowerShell enthusiasts. Both Slack and Discord are bridged via a bot and can seamlessly talk to each other.\r\n\r\n[StackOverflow.com](https://stackoverflow.com/questions/tagged/powershell) and [PowerShell.org Forum](https://powershell.org/forums/) - Search or post new general PowerShell usage questions\r\n\r\n[powershell-slack]: https://join.slack.com/t/powershell/shared_invite/enQtMzA3MDcxNTM5MTkxLTBmMWIyNzhkYzVjNGRiOTgxZmFlN2E0ZmVmOWU5NDczNTY2NDFhZjFlZTM1MTZiMWIzZDcwMGYzNjQ3YTRkNWM\r\n[powershell-discord]: https://discordapp.com/invite/AtzXnJM\r\n","author":{"url":"https://github.com/AnthonyPaull","@type":"Person","name":"AnthonyPaull"},"datePublished":"2019-11-20T23:54:47Z","url":"https://github.com/PowerShell/PowerShell/issues/11140"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:67c204f7-9103-7baa-fe55-5a2a3fbb5b19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AD5A:10FB47:CD544:116503:6AFD4ADB |
| html-safe-nonce | 7df6c43e689c27063895f31269223d687683f618ef28aa18fd875316b3564380 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDVBOjEwRkI0NzpDRDU0NDoxMTY1MDM6NkFGRDRBREIiLCJ2aXNpdG9yX2lkIjoiNTA5MDIyNjY2Nzg0Mjc4Mzk2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d098dc86130d4efdc925c9969df5995f170d03588c1ab18740065953d0c31d0 |
| hovercard-subject-tag | issue:526282797 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e1b0479f4f4edb812aeeca4a077d10dbbe126c633bdd1bd79b3d8b5fbbdaf516/PowerShell/PowerShell/issues/11140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e1b0479f4f4edb812aeeca4a077d10dbbe126c633bdd1bd79b3d8b5fbbdaf516/PowerShell/PowerShell/issues/11140 |
| og:image:alt | Support Question I've got a JSON file in this format: [ { "SensorApp": "HWiNFO", "SensorClass": "System: DELL XPS 13 9380", "SensorName": "Virtual Memory Commited", "SensorValue": "7286", "SensorUn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AnthonyPaull |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width