Objects JSON JS with two methods for console logging

two different uses of forEach