# Finding and replacing value in .json file using powershell

**URL:** https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866
**Category:** PowerShell Help
**Created:** [June 19, 2021, 3:14pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866 "2021-06-19T15:14:17Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![gopisettypradeep](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/gopisettypradeep/32/1408_2.png) [@gopisettypradeep](https://forums.powershell.org/u/gopisettypradeep)
#### Post date: [June 19, 2021, 3:14pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/1 "2021-06-19T15:14:17Z")

</div>

Finding and replacing value in .json file using powershell

 ![16242010292763091175767759926077](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/0/0e33802252a0f35b3b83b62d2bd2ef0469c885f9.jpeg)

In the above script

Routes.endpoint:./runtime.destination value is not able to read

---

<div class="post-metadata">

### Author: ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)
#### Post date: [June 19, 2021, 4:04pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/2 "2021-06-19T16:04:40Z")

</div>

Gopisettypradeep,  
welcome the the forum.

Is there a particular question you want to ask?

If you want to learn in general about how to replace/update values in JSON data you may use your favorite internet search engine to search for help and examples. Like here:

[https://www.google.com/search?q=replacing+vaule+in+JSON+with+PowerShell&oq=replacing+vaule+in+JSON+with+PowerShell&aqs=chrome..69i57.12236j0j1&sourceid=chrome&ie=UTF-8](https://www.google.com/search?q=replacing+vaule+in+JSON+with+PowerShell&oq=replacing+vaule+in+JSON+with+PowerShell&aqs=chrome..69i57.12236j0j1&sourceid=chrome&ie=UTF-8)

---

<div class="post-metadata">

### Author: ![gopisettypradeep](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/gopisettypradeep/32/1408_2.png) [@gopisettypradeep](https://forums.powershell.org/u/gopisettypradeep)
#### Post date: [June 20, 2021, 3:02pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/3 "2021-06-20T15:02:40Z")

</div>

Suggest to use foreach in rotues. (Content section)

---

<div class="post-metadata">

### Author: ![gopisettypradeep](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/gopisettypradeep/32/1408_2.png) [@gopisettypradeep](https://forums.powershell.org/u/gopisettypradeep)
#### Post date: [June 20, 2021, 3:03pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/4 "2021-06-20T15:03:12Z")

</div>

Not striking any idea

---

<div class="post-metadata">

### Author: ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)
#### Post date: [June 20, 2021, 3:12pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/5 "2021-06-20T15:12:26Z")

</div>

I’m still unsure what you expect. You should ask a clear question.

Regardless of that - please do not post pictures of code or sample data. Instead use the “_preformatted text_” button ( **\</\>** ) and post the plain text.

Thanks in advance

---

<div class="post-metadata">

### Author: ![tonyd](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/tonyd/32/1041_2.png) [@tonyd](https://forums.powershell.org/u/tonyd)
#### Post date: [June 21, 2021, 5:49pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/6 "2021-06-21T17:49:44Z")

</div>

This might be overly paranoid, but there is PII in the image posted. I would remove it. My $.02

---

<div class="post-metadata">

### Author: ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)
#### Post date: [June 21, 2021, 5:59pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/7 "2021-06-21T17:59:46Z")

</div>

I doubt that your concerns will be understood. 😉

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 8:24pm UTC](https://forums.powershell.org/t/finding-and-replacing-value-in-json-file-using-powershell/16866/8 "2024-05-16T20:24:13Z")

</div>


