convert the JSON to ActiveRecords