title: how to write a script to edit a JSON file?
body: <p>For example I have a file called <code>people.json</code>. Its content is:</p>
  
  <pre><code>[
    {"name": "Paul",
    "age": 29,
  },
    {"name": "Kathy",
    "age": 101,
  },
    {"name": "Paula",
    "age": 12,
  },
    {"name": "Bruce",
    "age": 56,
  }
  ]
  </code></pre>
  
  <p>so here I wanted to add a picture link for each person for example</p>
  
  <pre><code>[{"name":"Paul",
   "age" : 29,
   "pic" : "paul.png"
  },
    {"name": "Kathy",
    "age": 101,
   "pic" : "kathy.png"
  },
    {"name": "Paula",
    "age": 12,
   "pic" : "paula.png"
  },
    {"name": "Bruce",
    "age": 56,
   "pic" : "bruce.png"
  }
  ]
  </code></pre>
  
  <p>How do I go about writing a script to add a <code>pic</code> key into each person and add in a person.name.lowercase + ".png" as a value?</p>
  
  <p>At the end of the process, the  people.json will be edited and saved into the hardware and not memory.</p>
  
  <p>Thank you very much.</p>