How to use re:replace #1728
Unanswered
ta7tUHIJHx4RwR21
asked this question in
Q&A
Replies: 1 comment
-
I figured it out using a jq if then statement. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If I have a JSON watch that returns something like:
{
{
"StoreName":"ToysRUs"
"Inventory":"3333"
}
{
"StoreName":"EBgames"
"Inventory":"5555"
}
{
"StoreName":"KBtoys"
"Inventory":"4444"
}
}
If Inventory:3333 = in stock, 5555 = not available, and 4444 = on order, how do I replace the values with "in stock", "not available", or "on order"? So it would read:
{
{
"StoreName":"ToysRUs"
"Inventory":"in stock"
}
{
"StoreName":"EBgames"
"Inventory":"not available"
}
{
"StoreName":"KBtoys"
"Inventory":"on order"
}
}
Beta Was this translation helpful? Give feedback.
All reactions