Extract data from tokens with javascript syntax