Make a method for this condition:

if (this.hasMedia(chronologyEvent)) {...}

Better yet, in a next refactoring, we should wrap the json data into a response object so that you can make things more object oriented:

if (chronologyEvent.hasMedia()) { ... }