title: Find and edit a Json file using bash
body: <p>I have multiple files in the following format with different categories like:</p>
  
  <pre><code>{
      "id": 1,
      "flags": ["a", "b", "c"],
      "name": "test",
      "category": "video",
      "notes": ""
  }
  </code></pre>
  
  <p>Now I want to append all the files flags whose category is <code>video</code> with string <code>d</code>. So my final file should look like the file below:</p>
  
  <pre><code>{
      "id": 1,
      "flags": ["a", "b", "c", "d"],
      "name": "test",
      "category": "video",
      "notes": ""
  }
  </code></pre>
  
  <p>Now using the following command I am able to find files of my interest, but now I want to work with editing part which I an unable to find as there are 100's of file to edit manually, e.g.</p>
  
  <pre><code>find . - name * | xargs grep "\"category\": \"video\"" | awk '{print $1}' | sed 's/://g'
  </code></pre>