database uses faster c++11 ranged for loop instead of for(iterator = jDoc.begin()... syntax.