Fügen Sie die Eigenschaft in JSON -Datei mit Bash ein

sed -i '$s/}/,\n"location":"canada"}/' sample.json
Gifted Gorilla