extract variable in JS