Changed jsonresolve to accept data from mongodb.