Welcome › Forums › General PowerShell Q&A › how to search json
- This topic has 0 replies, 1 voice, and was last updated 1 month ago by
rahulruns96.
Viewing 0 reply threads
-
AuthorPosts
-
-
December 15, 2020 at 2:51 am #279729
In a json if I want to search for a key which could be at any level and multiple places, how do I do it.
In a json if I want to search for a key which could be at any level and multiple places, how do I do it. Example I have below JSON. In JSON there are places where componentID is present. Each ComponentId is different. I need to search value of that componentId in json and where it matches pick that object in json. This is kind of function which helps to pickup that object out of json based on componentId value. Any module to achieve this or any idea to help on this
PowerShell12345678910111213141516171819202122"infra": {"config": {"rack": [{"componentId": "xxx-001","model": "xxx","server": [{"componentId": "server-001","type": "xxxx","model": "xxxx","role": "Management","specificAttributes": ""............"platform": {"config": {"mgmtser": [{"componentId": "sr-001","domainName": "xxxxx","thinDiskMode": true,"deployment": "small",-
This topic was modified 1 month ago by
rahulruns96.
-
This topic was modified 1 month ago by
rahulruns96.
-
This topic was modified 1 month ago by
rahulruns96.
-
This topic was modified 1 month ago by
grokkit. Reason: code formatting - please read the guide
-
This topic was modified 1 month ago by
-
-
AuthorPosts
Viewing 0 reply threads
- You must be logged in to reply to this topic.