Q:

add data to json object

// base code ----------------------------------------------------------
	object["property"] = value;
	 // or
	object.property = value;
// exampel : ----------------------------------------------------------
	var myJson = { name: "mamad", family: "mirzaei" }
// i wana to add age 
	myJson.age = 26
// log =>
	console.log( "myJson >>:" ,myJson) 
// resalt =>
	{ name: "Mamad", family: "Mirzaei", age : 26 }
3
object.property = value;
0

New to Communities?

Join the community