title: What is the best way to replace text in json?
body: <p>So I have a bunch of <code>JSON</code> data and it contains a few fields. for example:</p>
  
  <pre><code>[{
      "id": "XXX",
      "version": 1,
      "head": {
          "text": "Main title",
          "sub": {
              "value": "next"
          },
          "place": "secondary"
      },
      "body": [{
              "id": "XXX1",
              "info": "three little birds",
              "extended": {
                  "spl": {
                      "text": "song",
                      "type": {
                          "value": "a"
                      }
                  }
              }
          },
          {
              "id": "XXX2",
              "info": [
                  "how are you?"
              ],
              "extended": {
                  "spl": {
                      "text": "just",
                      "non-type": {
                          "value": "abc"
                      }
                  }
              }
          }
      ]
  }]
  </code></pre>
  
  <ol>
  <li><p>what I'm trying to do is kind of conversion table (from a different JSON file)
  if a field has the value 'a' replace it with 'some other text..' etc.</p></li>
  <li><p>I have a service for the <code>JSON</code> pipeline, so I guess this is the right place to do the replacement.</p></li>
  </ol>
  
  <p>so for this example, I have the <code>JSON</code> above and in my conversion table I have the following terms:</p>
  
  <p>next: forward,
  song: music,
  a: option1,
  just: from
  etc...</p>