Shiny JS: default Input Bindings getValue() usage

I would like to get value of Shiny default input using available JS "methods" (reuse available code). Could you please tell me if the below example is proper way of doing it:

R:

checkboxGroupInput("checkGroup", label = h3("Checkbox group"), 
    choices = list("Choice 1" = 1, "Choice 2" = 2, "Choice 3" = 3),
    selected = 1)

JS to get value:

var inputValue = $('#checkGroup')
                    .data("shinyInputBinding")
                    .getValue(
                      $('#checkGroup').get(0)
                     );

?