Updated the input class to be able to accept json objects as well as arrays