I want to do this in ruby.
Say I have an example.json file that looks like
{
"name" : "My name is - "
}
and I want to update that to
{
"name" : "My name is - Chris"
}
I know to do this
require 'json'
json = JSON.parse('example.json')
name = json['name'] + ' Chris'
Now how I write name back into example.json file and save the file, simply like this?
json['name'] = name