Separating input values into rows in the dataset

Anyway to merge something like…

if ( $w ( ‘#dropdown4’ ) !== null )

{ “fullName” : $w ( ‘#input1’ ). value , “emailAddress” : $w ( ‘#input2’ ). value , “sessionName” : $w ( ‘#dropdown4’ ). value },