I used to override toString functino in my model class and I always have to make a string of all the variables . This javascript code will automatically do that for me :)