How to replace json parameter dynamically

I need to change the “version” value at run time. How it can be done via shell script? as per below json, I need to replace “20181018” with “20181234”. No more change OR extra space should come.

“app”: “Deploy”,
“env”: “UAT”,
“versions”: [
“version”: “20181018”,

In above query, that new parameter would be supplied via an argument which would be passed along with the shell.
For an instance, If is the script, Then I would be executing it as

./ 20181234

So, should change the value “20181018” with $1 in json file.
Hope, it clarifies the requirement

@Amit_Kumar did you find a solution for this? I am having a same requirement as yours. Please let me know if you figured this out.