title: How can I use jsonpath in python to change an element value in the json object
body: <p>I have the following json object (Say car_details.json):</p>
  
  <pre><code>{
     "name":"John",
     "age":30,
     "cars":
     [
       {
         "car_model": "Mustang",
         "car_brand": "Ford"
       },
       {
         "car_model": "cx-5",
         "car_brand": "Mazda"
       } 
  }
  </code></pre>
  
  <p>I want to change the value of car_model from cx-5 to cx-9 through python code. 
  I am providing the json path to this element, through an external file. The json-path expression is basically represented as a string. Something like this:
  'cars[2].car_model'
  And the new value is also provided through an external file as a string:
  'cx-9'</p>
  
  <p>Now how do I parse through car_details.json using the jsonpath expression, and change its value to the one provided as string, and finally return the modified json object</p>
  
  <p>P.S I want to do this through python code</p>