I’ve been trying for quite some time to get a JSON file and edit one of the values in the array (to be passed to PHP)
My current code is
j1 = $.getJSON("data.json")
j1.responseJSON[name].job = "Carpenter"
When I use console.log(j1) after that, it logs the JSON the same as it was before (with name’s job being “Baker”). What am I doing wrong, and how can I fix it?
UPDATE 1: ADDED JSON
{
name:{
{"job":"Baker", "age":"twenty-three","educated":"yes"}
}
}