insert property in json file with bash code example Example: insert property in json file with bash sed -i '$s/}/,\n"location":"canada"}/' sample.json