title: How to get data from JSON file with batch script and write the data into a text file?
body: <p>I would like to get data from a *.json file into <code>file.txt</code> with batch.</p>
  
  <p>My JSON file <code>config.json</code>:</p>
  
  <pre><code>  "nodes": [
          {
            "id": "item1",
            "host": "${host:item1}",
            "apps": [
              {
                "id": "value1",
                "template_id": "value1"
              },
              {
                "id": "value2",
                "template_id": "value2",
              },
  </code></pre>
  
  <p>I want to get only the values <code>value1</code> and <code>value2</code> of <code>id</code> elements of node <code>apps</code>. But the problem on using the command <code>find</code> in my script is actually that it reads the values of <code>id</code> and <code>template_id</code>.</p>
  
  <p>Is it possible to get the value to <code>id</code> and not <code>template_id</code>? </p>
  
  <p>I tried this... still not working...</p>
  
  <pre><code>setlocal EnableDelayedExpansion
  set c=0
  for /f "tokens=2 delims=:, " %%a in (' find "id" ^&lt; "config.json" ') do (
      set /a c+=1
      set val[!c!]=%%~a
  )
  for /L %%b in (1,1,!c!) do echo !val[%%b]!
  </code></pre>
  
  <p>And after that, I don't know really how to get all these data in my text file.</p>