How to add a new key value pair in existing JSON object using JavaScript?

 const Districts=[
  {
    "District": "Gorkha",
    "Headquarters": "Gorkha",
    "Area": "3,610",
    "Population": "271,061"
  },
  {
    "District": "Lamjung",
    "Headquarters": "Besisahar",
    "Area": "1,692",
    "Population": "167,724"
  }
]
Districts.map(i=>i.Country="Nepal")
console.log(Districts)

If you have JSON Array Object Instead of a simple JSON.

const Districts= [
  {
    "District": "Gorkha",
    "Headquarters": "Gorkha",
    "Area": "3,610",
    "Population": "271,061"
  },
  {
    "District": "Lamjung",
    "Headquarters": "Besisahar",
    "Area": "1,692",
    "Population": "167,724"
  }
]

Then you can map through it to add new keys.

Districts.map(i=>i.Country="Nepal");

If you want to add new key and value to each of the key of json object and then you can use the following code else you can use the code of other answers -

Object.keys(json).map(
  function(object){
    json[object]["newKey"]='newValue'
});

There are two ways for adding new key value pair to Json Object in JS

var jsObj = {
    "workbookInformation": {
        "version": "9.1",
        "source-platform": "win"
    },
    "datasources1": {

    },
    "datasources2": {

    }
}

1.Add New Property using dot(.)

jsObj.workbookInformation.NewPropertyName ="Value of New Property"; 

2.Add New Property specifying index like in an arrays .

jsObj["workbookInformation"]["NewPropertyName"] ="Value of New Property"; 

Finally

 json = JSON.stringify(jsObj);
 console.log(json)