json object returns to server/ error 500 with unknown undefined property