This is a little complex.
8 people were charged under the espionage act under Obama, none of them journalists.
However, it does appear that in one of these cases the DOJ attempted to go after a journalist, a reporter James Rosen as “at the very least, either as an aider, abettor and/or co-conspirator.” " which was apparently a bit of a first, attempting to go after journalists who received leaks.
He was not arrested or charged but it's possible that's because of the media backlash over the incident.
So far I can only find two examples of people charged under the espionage act under Trump.
Neither of them journalists.
However under Trump, Sessions said the administration was reviewing policies on forcing journalists to reveal their sources.
“We respect the important role that the press plays and will give them
respect, but it is not unlimited,”
Deputy Attorney General Rod Rosenstein told reporters the department was just starting to review the policy on media subpoenas and could not say yet how it might be changed. But he did not rule out the possibility of threatening journalists with jail time.
So in conclusion:
"Obama used the espionage act to have journalists arrested." : no, the journalist was not arrested but was investigated under the espionage act and threatened with being charged as a co-conspirator, which caused a media backlash.
"Trump has not done this." : Yes, but his administration has implied they want to.