So I'm trying to add info to my .json file, a first name and a last name, 
from just running the script via terminal in kali linux.

I have not have had much progress I have been searching online for the past 5 hours to find a way to fix this but there has not been much progress. 
Which leaves me here to post this, anyone know how to fix this error?

* Error from Terminal

```
Traceback (most recent call last):
        4: from /root/Desktop/JSON_thingy.rb:8:in `<main>'
        3: from /root/Desktop/JSON_thingy.rb:8:in `open'
        2: from /root/Desktop/JSON_thingy.rb:9:in `block in <main>'
        1: from /usr/lib/ruby/vendor_ruby/json/common.rb:156:in `parse'
/usr/lib/ruby/vendor_ruby/json/pure/parser.rb:118:in `parse': source in not valid JSON! (JSON::ParserError)

```

* Code

```
require 'json'
require 'json/pure'

json = {"first_name" => "john", "last_name" => "doe"}

initial_json = File.read('/root/Desktop/jsonDatabase.json')

File.open("/root/Desktop/jsonDatabase.json","w") do |f|
  f.puts JSON.pretty_generate(JSON.parse(initial_json) << json )
end 

```

* JSON

```
[
{
 "first_name": "albert",
 "last_name": "einstein"
},
{
 "first_name": "edgar",
 "last_name": "poe"
}
]

```