Question is pretty much in the title. What's the best way to refactor something like below?
json["data"]["counts"]["followed_by"] if json && json["data"] && json["data"]["counts"] && json["data"]["counts"]["followed_by"]
I want to return nil
unless json["data"]["counts"]["followed_by"]
exists.