parse_val function

Parse the shiny_input value from JSON