Steps to insert data into a database

Currently the playbook runs a task which generates a result file in /tmp/result.out
Then it runs a parsing python script I put in common/files/parser.py and passes /tmp/result.out to the script as a parameter. The script prints to STDOUT the parsed results in a JSON format as such

{
“elapsed_time”: “5”,
“foo”: “bar”
“foos”: { “afoo”: “abar”}
}

Everything here works. So now how do I go from this to being able to put the above JSON string into a nosql database such as mongodb or orientdb?