Edit JSON fields

Nine Zero

Well-known Member
Joined
Mar 10, 2016
Messages
625
I am looking to do the following

1. Take in a JSON file
2. Show the user a column in EXCEL filled with the values of a specific field
3. Have the column next to it be what the field will be changed to
4. Edit the JSON file with the new renamed values

1. Sample JSON
[
{
color: "red",
value: "#f00"
},
{
color: "green",
value: "#0f0"
},
{
color: "blue",
value: "#00f"
}
]

2. In EXCEL I would like Column A and B to have the following
AB
Current Value For ColorDesired Value For Color
redorange
greenpurple
bluewhite



3. Resulting edited JSON

[
{
color: "orange",
value: "#f00"
},
{
color: "purple",
value: "#0f0"
},
{
color: "white",
value: "#00f"
}
]

I simply need to do a bunch of replaces for a specific field

Anyway to accomplish this? VBA or no VBA does not matter.

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I would have just opened in a text file and did a F&R but wouldn't you also have to change the color value?
 
Upvote 0
I would have just opened in a text file and did a F&R but wouldn't you also have to change the color value?
This was just a sample I pulled off of Google, I really just need 1 field to be edited. And yes F&R would work but, there are over 900 replaces at any given moment. I also get that doing the F&R 900 times is the same as manually typing into each field what I need but there are a lot of fields that simply need an underscore, or a period removed (which can be accomplished via a formula) that would take care of a huge portion of them. Which is why I am looking for an Excel solution.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top