put json in a format mongodb would be happy with